Prefetch and Snakemake compatibility issue
1
0
Entering edit mode
2.9 years ago
steel1990 ▴ 20

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.1k views
ADD COMMENT
2
Entering edit mode
2.9 years ago

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',
ADD COMMENT
0
Entering edit mode

Excellent, thank you !

ADD REPLY

Login before adding your answer.

Traffic: 1465 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6