问题
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?
回答1:
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}"
来源:https://stackoverflow.com/questions/59053035/snakemake-rule-that-downloads-data