Snakemake-下载数据的规则 [英] Snakemake - rule that downloads data

查看:38
本文介绍了Snakemake-下载数据的规则的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在实施管道时遇到了一些麻烦,在该管道中,第一步是从某些服务器下载数据.据我了解,所有规则都必须具有作为文件的输入.但是,在我的情况下,输入"是提供给脚本的ID字符串,该脚本访问服务器并下载数据.
我知道了snakemake中的远程文件选项,但是服务器我从( ENA )下载的文件不在该列表中.此外,我正在使用一个调用aspera的脚本来提高下载速度.
关于如何在snakemake中实现这种方案的任何想法?

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?

推荐答案

规则实际上不需要输入字段,因此可能是这样:

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}"

这篇关于Snakemake-下载数据的规则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆