Skip to content

Commit

Permalink
Clear the fastq-dump cache after each sample
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Minot committed Feb 6, 2018
1 parent 161c604 commit a43afe6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/fastq_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a43afe6

Please sign in to comment.