From 919be0ad16dce11a86437c5660776513ec66a4cf Mon Sep 17 00:00:00 2001 From: Martin Hunt Date: Tue, 7 May 2024 15:02:30 +0100 Subject: [PATCH] Force delete because file(s) may not exist --- viridian/one_sample_pipeline.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/viridian/one_sample_pipeline.py b/viridian/one_sample_pipeline.py index 6830727..805af32 100644 --- a/viridian/one_sample_pipeline.py +++ b/viridian/one_sample_pipeline.py @@ -623,9 +623,9 @@ def final_tidy(self): if not self.debug: utils.syscall(f"rm -rf {self.processing_dir} {self.final_unmasked_fasta}*") if not (self.keep_bam or self.reads_bam is not None): - utils.syscall(f"rm {self.all_reads_bam}*") + utils.syscall(f"rm -f {self.all_reads_bam}*") if self.ena_run is not None and not self.keep_ena_reads: - utils.syscall(f"rm -r {self.ena_reads_dir}") + utils.syscall(f"rm -rf {self.ena_reads_dir}") if "debug" in self.log_dict: del self.log_dict["debug"]