如何解决使用 snakemake FTP 提供程序设置 FTP 代理
我正在尝试使用snakemake“snakemake.remote.FTP”从ftp服务器下载文件,如下所示:
from snakemake.remote.FTP import RemoteProvider as FTPRemoteProvider
FTP = FTPRemoteProvider()
chrList = [*range(1,23)]
...
# Download 1K genomes vcf files
rule download1kgenomes:
input: FTP.remote(expand("ftp.1000genomes.ebi.ac.uk/vol1/ftp/release/20130502/ALL.chr{chr}.phase3_shapeit2_mvncall_integrated_v5b.20130502.genotypes.vcf.gz",chr=chrList),keep_local=True,immediate_close=True),FTP.remote(expand("ftp.1000genomes.ebi.ac.uk/vol1/ftp/release/20130502/ALL.chr{chr}.phase3_shapeit2_mvncall_integrated_v5b.20130502.genotypes.vcf.gz.tbi",FTP.remote("ftp.1000genomes.ebi.ac.uk/vol1/ftp/release/20130502/20140625_related_individuals.txt",FTP.remote("ftp.1000genomes.ebi.ac.uk/vol1/ftp/release/20130502/integrated_call_samples_v3.20130502.ALL.panel",output: expand(config["refPanelDir"]+"/ALL.chr{chr}.phase3_shapeit2_mvncall_integrated_v5b.20130502.genotypes.vcf.gz",expand(config["refPanelDir"]+"/ALL.chr{chr}.phase3_shapeit2_mvncall_integrated_v5b.20130502.genotypes.vcf.gz.tbi",config["refPanelDir"]+"/20140625_related_individuals.txt",config["refPanelDir"]+"/integrated_call_samples_v3.20130502.ALL.panel"
params: outdir = config["refPanelDir"]
run:
shell("mv {input} {params.outdir}")
这在正常的互联网连接下运行良好,我认为这是一个很棒的蛇形功能。不幸的是,我的大学使用了代理,当我在办公室尝试此操作时,我在无法连接到远程服务器时收到错误消息:
File "/my/path/to/python3.9/site-packages/ftputil/error.py",line 199,in __exit__
raise FTPOSError(*exc_value.args,original_error=exc_value) from exc_value
ftputil.error.FTPOSError: [Errno 110] Connection timed out
Debugging info: ftputil 5.0.1,Python 3.9.5 (linux)
有谁知道如何为snakemake指定ftp代理设置,如果这可能的话?
问候
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。