From a43afe6e2aa3efbe92ea1938dfd665dce56f3d41 Mon Sep 17 00:00:00 2001 From: Sam Minot Date: Tue, 6 Feb 2018 15:54:44 -0800 Subject: [PATCH] Clear the fastq-dump cache after each sample --- lib/fastq_helpers.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/fastq_helpers.py b/lib/fastq_helpers.py index f2ee703..eab1f2e 100644 --- a/lib/fastq_helpers.py +++ b/lib/fastq_helpers.py @@ -94,6 +94,14 @@ def get_sra(accession, temp_folder): temp_folder, accession ]) + # Clear the cache + logging.info("Clearing the cache for fastq-dump") + run_cmds([ + "rm", + "-f", + "/root/ncbi/public/sra/{}*".format(accession) + ]) + # Combine any multiple files that were found logging.info("Concatenating output files") with open(local_path + ".temp", "wt") as fo: