Skip to content

Commit

Permalink
fix(preprocessor): check whether the index file exists before indexin…
Browse files Browse the repository at this point in the history
…g the uniallelic position VCF
  • Loading branch information
BinglanLi committed Nov 12, 2024
1 parent aa8692e commit d2078f0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion preprocessor/preprocessor/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,9 @@ def prep_pharmcat_positions(pharmcat_positions_vcf: Optional[Path] = None,
index_vcf(pharmcat_positions_vcf, verbose)

uniallelic_positions_vcf: Path = find_uniallelic_file(pharmcat_positions_vcf, must_exist=False)
create_uniallelic_vcf(uniallelic_positions_vcf, pharmcat_positions_vcf, reference_genome_fasta)
uniallelic_csi_file = Path(str(uniallelic_positions_vcf) + '.csi')
if not uniallelic_csi_file.is_file():
create_uniallelic_vcf(uniallelic_positions_vcf, pharmcat_positions_vcf, reference_genome_fasta)

regions_file: Path = find_regions_file(pharmcat_positions_vcf, must_exist=False)
create_regions_file(regions_file, pharmcat_positions_vcf, verbose)
Expand Down

0 comments on commit d2078f0

Please sign in to comment.