From 2223f50c6482349d2cdcf072bef9d2a715f150aa Mon Sep 17 00:00:00 2001 From: Jody Phelan Date: Mon, 2 Dec 2024 11:10:27 +0000 Subject: [PATCH] remove temp file produced --- tbprofiler/consensus.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tbprofiler/consensus.py b/tbprofiler/consensus.py index d82fa09..2bc8fc1 100644 --- a/tbprofiler/consensus.py +++ b/tbprofiler/consensus.py @@ -71,6 +71,7 @@ def get_consensus_vcf(sample: str,input_vcf: str,args: argparse.Namespace) -> st run_cmd(f"cat {args.conf['ref']} {consensus_file}> {tmp_aln}") outfile = f"{args.files_prefix}.masked.vcf" run_cmd(f"fa2vcf.py {tmp_aln} {outfile}") - os.remove(tmp_aln) + run_cmd(f'rm {tmp_aln} {tmp_aln}.fai') + return outfile