I am using snakemake in a workflow for NGS analyses. In one rule, I make use of the unique (temporary) output from another rule.The output of this one rule is also unique and contributes to the creation of the final output. A simple wildcard {sample} is used over these rules. I do not see any cyclic dependency, but snakemake tells me there is:
CyclicGraphException in line xxx of Snakefile: Cyclic dependency on rule
I understand that there is an option to investigate this problem: --debug-dag.
How do I interpret the output? What is candidate versus selected?
This my (pseudo-) code of the rule:
rule split_fasta:
input:
dataFile="data/path1/{sample}.tab",
scaffolds="data/path2/{sample}.fasta",
database="path/to/db",
output:
onefasta="data/path2/{sample}_one.fasta",
twofasta="data/path2/{sample}_two.fasta",
threefasta="data/path2/{sample}_three.fasta",
conda:
"envs/env.yaml"
log:
"logs/split_fasta_{sample}.log"
benchmark:
"logs/benchmark/split_fasta_{sample}.txt"
threads: 4
shell:
"""
python bin/split_fasta.py {input.dataFile} {input.scaffolds} {input.database} {output.onefasta} {output.twofasta} {output.threefasta}
"""
There is no other connection between input and output than in this rule.
The problem is solved now, further downstream and upstream some subtle dependencies were present.
But, for future reference I would like to know how to interpret the output od the --debug-dag option.