This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Prefetch and Snakemake compatibility issue

Prefetch will variably download a *.sra.vdbcache dependent on whether a file is deemed to contain 'difficult or noisy data' - How to deal with the .sra.vdbcache files after downloading a sra file?

How does one deal with this in snakemake? I am running a very large pipeline with limited disk storage so have my sra downloads under the 'temp()' option so they delete once not longer needed. Obviously including the vdbcache files in the output temp() option throws a file missing error on an occasion when an sra file is downloaded without a sra.vdbcache file. Does anyone know a workaround for this?

sra-tools snakemake pipeline prefetch

1 answer

including the vdbcache files in the output temp() option throws a file missing error on an occasion when an sra file is downloaded without a sra.vdbcache file

You could use the touch function so that a .sra.vdbcache is always created:

rule sra:
    output:
        sra= temp('{id}.sra'),
        vdb= temp(touch('{id}.sra.vdbcache')),
    shell: ...

rule one:
    input:
        sra= '{id}.sra',
        vdb= '{id}.sra.vdbcache',

Log in to answer this question.