我想運行一個簡單的規則snakemake文件如下:Thread.py錯誤snakemake
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中。我無法弄清楚這是如何與thread.py相關的。任何人都有這個錯誤的經驗?
要調試這個,我建議你把它添加到你的snakefile中:http://paste.ubuntu.com/24898100/ 然後你可以追加'|| error_exit「一些錯誤信息」給每個單獨的shell命令,以便知道在哪一步發生了故障。 – bli
似乎它是gunzip命令失敗。不明白爲什麼。它會引發警告「gzip:human_g1k_v37.fasta.gz:解壓縮正常,忽略尾隨垃圾」。但是,gunzip在Snakemake以外的命令行中工作正常。 – rioualen
@rioulaen我得到同樣的錯誤。 gunzip在snakemake外工作很好,但從snakemake跑步時拋出錯誤是很奇怪的! – user3015703