【发布时间】:2017-06-18 14:35:46
【问题描述】:
我正在尝试运行一个简单的单规则蛇形文件,如下所示:
resources_dir='resources'
rule downloadReference:
output:
fa = resources_dir+'/human_g1k_v37.fasta',
fai = resources_dir+'/human_g1k_v37.fasta.fai',
shell:
('mkdir -p '+resources_dir+'; cd '+resources_dir+'; ' +
'wget ftp://ftp-trace.ncbi.nih.gov/1000genomes/ftp/technical/reference/human_g1k_v37.fasta.gz; gunzip human_g1k_v37.fasta.gz; ' +
'wget ftp://ftp-trace.ncbi.nih.gov/1000genomes/ftp/technical/reference/human_g1k_v37.fasta.fai;')
但我得到一个错误:
Error in job downloadReference while creating output files
resources/human_g1k_v37.fasta, resources/human_g1k_v37.fasta.fai.
RuleException:
CalledProcessError in line 10 of
/lustre4/home/masih/projects/NGS_pipeline/snake_test:
Command 'mkdir -p resources; cd resources; wget ftp://ftp-
trace.ncbi.nih.gov/1000genomes/ftp/technical/reference/human_g1k_v37.fasta.gz; gunzip human_g1k_v37.fasta.gz; wget ftp://ftp-trace.ncbi.nih.gov/1000genomes/ftp/technical/reference/human_g1k_v37.fasta.fai;' returned non-zero exit status 2.
File "/lustre4/home/masih/projects/NGS_pipeline/snake_test", line 10, in __rule_downloadReference
File "/home/masih/miniconda3/lib/python3.6/concurrent/futures/thread.py", line 55, in run
Removing output files of failed job downloadReference since they might be corrupted:
resources/human_g1k_v37.fasta
Will exit after finishing currently running jobs.
Exiting because a job execution failed. Look above for error message
我没有在snakemake 中使用threads 选项。我不知道这与thread.py有什么关系。有人遇到过这个错误吗?
【问题讨论】:
-
要调试它,我建议你将它添加到你的蛇文件中:paste.ubuntu.com/24898100 然后你可以将
|| error_exit "some error message"附加到每个单独的 shell 命令中,以便了解失败发生在哪一步。 -
似乎是失败的 gunzip 命令。不知道为什么。它会引发警告“gzip:human_g1k_v37.fasta.gz:解压OK,尾随垃圾被忽略”。但是,gunzip 在 Snakemake 之外的命令行中可以正常工作...
-
@rioulaen 我得到了同样的错误。奇怪的是,gunzip 在snakemake 之外工作正常,但在从snakemake 运行时抛出错误!
-
所以我误认为我的无效
cd假设...
标签: python-3.x gzip snakemake