Snakemake - rule that downloads data

让人想犯罪 __ 提交于 2021-01-27 19:21:33

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!