Skip to content

Commit

Permalink
Remove temporary files.
Browse files Browse the repository at this point in the history
  • Loading branch information
aghozlane committed Sep 2, 2024
1 parent 582c3bf commit 6ff0703
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions meteor/variantcalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,8 @@ def execute(self) -> None:
# Ensure the temporary file is removed after use
if os.path.isfile(temp_ref_file_path):
os.remove(temp_ref_file_path)
if os.path.isfile(temp_ref_file_path + ".fai"):
os.remove(temp_ref_file_path + ".fai")
logging.info(
"Completed freebayes step in %f seconds", perf_counter() - startfreebayes
)
Expand Down Expand Up @@ -543,3 +545,5 @@ def execute(self) -> None:
cram_file, vcf_file, consensus_file, freebayes_version
)
self.save_config(config, self.census["Stage3FileName"])
if os.path.isfile(temp_bed_file.name):
os.remove(temp_bed_file.name)

0 comments on commit 6ff0703

Please sign in to comment.