This is a test version of Biostars. For the public version, visit https://www.biostars.org.
SRAToolkit - Delete cache after each sam-dump run

Hi everyone ,

I'm trying to do a bunch of sam-dumps (piping the .sam outputs to .bam) - however, each time sam-dump runs, a sizeable cache file gets created in the sra directory. Since I need to run sam dumps around 4000 times, I can't possibly keep the caches anywhere because it'll be a few terabytes large. So, I need to delete them as soon as I'm done with each sam-dump. How can I achieve this in a shell script?

I tried running cache-mgr -c, but it ends up clearing out the .bam files I need to keep as well.

Thanks!

sequence sra sratoolkit sam-dump

1 answer

If you have not run vdb-config to set up a separate cache directory then do that first. That way you can still do cache-mgr /path_to_cache_dir -c and still keep your BAM files intact.

you are a savior. Thank you so much for pointing out that I can identify a path with cache-mgr!

Log in to answer this question.