Skip to content

Commit

Permalink
Fix tmp path for variant calling
Browse files Browse the repository at this point in the history
  • Loading branch information
aghozlane committed Sep 6, 2024
1 parent a96bba9 commit dba43ff
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions meteor/variantcalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,9 @@ def execute(self) -> None:
merged_df["startpos"] = 0
# Extract the required columns
result_df = merged_df[["gene_id", "startpos", "gene_length"]]
with NamedTemporaryFile(suffix=".bed", delete=False) as temp_bed_file:
with NamedTemporaryFile(
suffix=".bed", dir=self.meteor.tmp_dir, delete=False
) as temp_bed_file:
result_df.to_csv(
temp_bed_file.name, sep="\t", index=False, header=False
)
Expand Down Expand Up @@ -455,7 +457,9 @@ def execute(self) -> None:
with reference_file.open("rb") as ref_fh:
with bgzip.BGZipReader(ref_fh, num_threads=self.meteor.threads) as reader:
decompressed_reference = reader.read()
with NamedTemporaryFile(suffix=".fasta", delete=False) as temp_ref_file:
with NamedTemporaryFile(
suffix=".fasta", dir=self.meteor.tmp_dir, delete=False
) as temp_ref_file:
temp_ref_file.write(decompressed_reference)
temp_ref_file_path = temp_ref_file.name
# index on the fly
Expand Down

0 comments on commit dba43ff

Please sign in to comment.