Hi everyone, I'm writing the simple linear snakemake pipeline on multiple samples.
I'm runnign snakemake with -k
parameters, so failing in one branch does not cause to fail whole pipeline. But I'd like also to have a meaningfull info (possibly via emails) on the pipeline status (which joabs are done, and which are failed).
There is a --log-handler-script
parameter which supposetly should give me necessary functioonality. BUT, the msg
's produced by sankemake rather uninformative:
as one might see the one of the job failed but msg
(i just printed it to terminal from the def log_handler(msg):
) does not tell me which step went wrong. And I do not see how I can get the jobID of failed job before I the pipeline is over. Any suggestions are appreciated
Best, Eugene
if something crashed it is usually pretty easy to figure out what happened but if a task exited with a normal status code but a file is missing then yes it won't be super helpful
It is pritty easy to figure out what happend in manual examination. My task was to automatically detect failed rules and report them (via emails or something like that), while the rest of a pipeline goes on (
-k
option). And _automatic_ detection of failed jobs is surprisengly inconvenientin snakemakeI assume this something you may have already added, but to be sure, do you have the log directives as part of your rules? https://snakemake.readthedocs.io/en/stable/tutorial/advanced.html?highlight=log%20directive#step-5-logging
This allows you to see errors more specifically linked to the jobs submitted.
As for emails I find the following helpful: https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html?highlight=onstart#onstart-onsuccess-and-onerror-handlers