次snakemakeスクリプト:ゼロ以外の終了ステータス141はそのsnakemakeが持っていると言っているようだ戻っ取り扱いSIGPIPEエラー
snakemake -s test.snake
Provided cores: 1
Rules claiming more threads will be scaled down.
Job counts:
count jobs
1 all
1 pipe
2
rule pipe:
output: test.done
jobid: 1
Error in job pipe while creating output file test.done.
RuleException:
CalledProcessError in line 9 of /Users/db291g/Tritume/test.snake:
Command '
seq 1 10000 | head > test.done
' returned non-zero exit status 141.
File "/Users/db291g/Tritume/test.snake", line 9, in __rule_pipe
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/concurrent/futures/thread.py", line 55, in run
Removing output files of failed job pipe since they might be corrupted:
test.done
Will exit after finishing currently running jobs.
Exiting because a job execution failed. Look above for error message
説明:
rule all:
input:
'test.done'
rule pipe:
output:
'test.done'
shell:
"""
seq 1 10000 | head > test.done
"""
は、次のエラーで失敗しますhead
によって送信されたSIGPIPEの失敗を検出しました。厳密に言うと、snakemakeは失敗をキャッチするのに正しいことをしていますが、このようなエラーのいくつかのタイプを無視することが可能かどうかは疑問です。 head
コマンドを使用してsnakemakeスクリプトがあり、このエラーを回避する方法を見つけることを試みています。
はい、ほとんどの場合、これは暗黙のうちに期待されるため、Snakemakeはデフォルトでpipefailを設定します。 'set + o pipefail;を続けることで、特定のコマンドに対していつでも非アクティブ化することができます。 'をシェルコマンドに渡します。 –
ありがとうございます!あなたが回答としてそれを投稿するなら、私はそれを受け入れるでしょう。 – dariober