The following page outlines common problems with uploading Snakemake workflows and solutions.
Problem | Common Solution |
---|---|
The above error occured when reading the Snakefile to extract workflow metadata. | Snakefile has errors outside of any rules. Frequently caused by missing dependencies (look for ModuleNotFoundError ). Either install dependencies or add a latch_metadata.py file |
snakemake.exceptions.WorkflowError: Workflow defines configfile config.yaml but it is not present or accessible (full checked path: /root/config.yaml) | Include a config.yaml in the workflow Docker image. Currently, config files cannot be generated from workflow parameters. |
Command '['/usr/local/bin/python', '-m', 'latch_cli.snakemake.single_task_snakemake', ...]' returned non-zero exit status 1. | The runtime single-job task failed. Look at logs to find the error. It will be marked with the string [!] Failed . |
Runtime workflow task fails with FileNotFoundError in file /root/workflow/Snakefile but the file is specified in workflow parameters | Wrap the code that reads the file in a function. See section “Input Files Referenced Outside of Rules” |
MultiQC No analysis results found. Cleaning up.. | FastQC outputs two files for every FastQ file: the raw .zip data and the HTML report. Include the raw .zip outputs of FastQC in the MultiQC rule inputs. See section “Input Files Not Explicitly Defined in Rules” “ |
Path("inputs").glob(...)
call is not under any rule, it runs in all tasks. Because the fastqc
rule does not specify input_dir
as an input
, it will not be downloaded and the code will throw an error.
input
, output
, params
, and other declarations with static strings for the runtime workflow so any function calls within them will be replaced with pre-computed strings and the Snakefile will not attempt to read the files again.
Same example at runtime:
.zip
and .html
in the case of FastQC), explicitly specify these files in the outputs of the previous rule and in the inputs of the subsequent rule.
Example