title: Snakemake: The use of --debug-dag for detecting cyclic dependencies
body: <p>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:</p>
  
  <p>CyclicGraphException in line xxx of Snakefile: Cyclic dependency on rule</p>
  
  <p>I understand that there is an option to investigate this problem: --debug-dag.</p>
  
  <p>How do I interpret the output? What is candidate versus selected?</p>
  
  <p>This my (pseudo-) code of the rule:</p>
  
  <pre><code>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} 
          """
  </code></pre>
  
  <p>There is no other connection between input and output than in this rule.</p>
  
  <p>The problem is solved now, further downstream and upstream some subtle dependencies were present.</p>
  
  <p>But, for future reference I would like to know how to interpret the output od the --debug-dag option.</p>