Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Snakemake - rule that downloads data

I am having some trouble implementing a pipeline in which the first step is downloading the data from some server. As far as I understand, all rules must have inputs which are files. However, in my case the "input" is an ID string given to a script which accesses the server and downloads the data.
I am aware of the remote files option in snakemake, but the server I am downloading from (ENA) is not on that list. Moreover, I am using a script which calls aspera in order to improve download speed.
Any ideas of how such a scenario can be implemented in snakemake?

like image 235
soungalo Avatar asked Dec 04 '25 17:12

soungalo


1 Answers

Rules actually do not need an input field, so sth like this is possible:

rule download:
    output:
        "downloads/{sample}.fa"
    shell:
        "ascp ftp:/url_here+{wildcards.sample}"
like image 135
Maarten-vd-Sande Avatar answered Dec 08 '25 21:12

Maarten-vd-Sande



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!