|
1 | 1 | """Balsamic reference cache models.""" |
| 2 | +import re |
2 | 3 | import logging |
3 | 4 | from pathlib import Path |
4 | 5 | from typing import Dict, Optional, List, Union |
@@ -148,6 +149,12 @@ def get_cadd_snv_file_paths(self) -> List[str]: |
148 | 149 | """Return CADD SNV reference output files.""" |
149 | 150 | return [self.cadd_snv.file_path, f"{self.cadd_snv.file_path}.{FileType.TBI}"] |
150 | 151 |
|
| 152 | + def get_processed_clinvar_file_path(self) -> str: |
| 153 | + return re.sub(r"\.vcf$", "_processed.vcf.gz", self.clinvar.file_path) |
| 154 | + |
| 155 | + def get_processed_clinvar_index_path(self) -> str: |
| 156 | + return re.sub(r"\.vcf$", "_processed.vcf.gz.tbi", self.clinvar.file_path) |
| 157 | + |
151 | 158 | def get_delly_file_paths(self) -> List[str]: |
152 | 159 | """Return Delly associated output files.""" |
153 | 160 | return [ |
@@ -400,12 +407,13 @@ def get_reference_output_paths(self) -> List[str]: |
400 | 407 | self.references.ascat_gc_correction.file_path, |
401 | 408 | self.references.cadd_snv.file_path, |
402 | 409 | self.references.simple_repeat.file_path, |
403 | | - f"{self.references.clinvar.file_path}.{FileType.GZ}", |
404 | 410 | f"{self.references.cosmic.file_path}.{FileType.GZ}", |
405 | 411 | f"{self.references.dbsnp.file_path}.{FileType.GZ}", |
406 | 412 | self.references.rank_score.file_path, |
407 | 413 | f"{self.references.somalier_sites.file_path}.{FileType.GZ}", |
408 | 414 | self.references.wgs_calling_regions.file_path, |
| 415 | + self.references.get_processed_clinvar_file_path(), |
| 416 | + self.references.get_processed_clinvar_index_path(), |
409 | 417 | *self.get_compressed_indexed_vcf_paths(), |
410 | 418 | *self.references.get_1k_genome_file_paths(), |
411 | 419 | *self.references.get_cadd_snv_file_paths(), |
@@ -434,7 +442,7 @@ def get_analysis_references( |
434 | 442 | ascat_gc_correction=self.references.ascat_gc_correction.file_path, |
435 | 443 | cadd_snv=self.references.cadd_snv.file_path, |
436 | 444 | simple_repeat=self.references.simple_repeat.file_path, |
437 | | - clinvar=f"{self.references.clinvar.file_path}.{FileType.GZ}", |
| 445 | + clinvar=self.references.get_processed_clinvar_file_path(), |
438 | 446 | cosmic=f"{self.references.cosmic.file_path}.{FileType.GZ}", |
439 | 447 | dbsnp=f"{self.references.dbsnp.file_path}.{FileType.GZ}", |
440 | 448 | delly_exclusion=self.references.delly_exclusion.file_path, |
|
0 commit comments