Skip to content

bio/salmon/index (and bio/salmon/quant) example declares index.tct/index.tdct as unconditional outputs, but Salmon only creates them for small references #5543

Description

@niekwit

Snakemake version
Snakemake=8.25.5
"v9.12.0/bio/salmon/index"
"v9.13.0/bio/salmon/quant"

Describe the bug
The bio/salmon/index example (and its test/Snakefile, which the docs page reuses verbatim) declares 11 output files via multiext(), including index.tct and index.tdct:

rule salmon_index:
    input:
        sequences="assembly/transcriptome.fasta",
    output:
        multiext(
            "salmon/transcriptome_index/",
            "index.ssi",
            "refseq_offsets.json",
            "index.ectab",
            "index.ctab",
            "refseq.bin",
            "index.ssi.mphf",
            "index.refinfo",
            "info.json",
            "duplicate_clusters.tsv",
            "index.tct",
            "index.tdct",
        ),
    ...
    wrapper:
        "v9.14.0/bio/salmon/index"

These two files are Salmon's "Tiny index artifacts": an internal optimization that Salmon's own log shows is applied conditionally, based on a fixed k-mer count threshold:

auto dict selection: 33571951 canonical k-mers (100000000 threshold), emitting Tiny artifacts: true

For a small reference (e.g. the wrapper's own toy assembly/transcriptome.fasta test fixture, or a small test genome), the k-mer count stays under 100,000,000 and Salmon always creates index.tct/index.tdct . So the example "works" in CI. But for a real, whole-genome reference (e.g. full human/mouse transcriptome + genome decoy), the k-mer count is far higher, Salmon decides emitting Tiny artifacts: false, and these two files are never created.

Because the wrapper's example declares them as required output:/input: files, this causes a failure on any real-scale dataset:

MissingOutputException in rule salmon_index in file .../resources.smk, line 52:
Job completed successfully, but some output files are missing. Missing files after 20 seconds. This might be due to filesystem latency. If that is the case, consider to increase the wait time with --latency-wait:
resources/human_49_gentrome_index/index.tct (missing locally, parent dir contents: index.ssi.mphf, refseq_offsets.json, index.ssi, duplicate_clusters.tsv, refseq.bin, info.json, index.refinfo, index.ectab, index.ctab)
resources/human_49_gentrome_index/index.tdct (missing locally, parent dir contents: ...)

Suggested fix

Drop index.tct/index.tdct from the documented example (and test/Snakefile) for both bio/salmon/index and bio/salmon/quant, since:

  • They're optional/conditional outputs, not something every salmon index run produces.
  • They aren't required for salmon quant to work and quantification runs fine without them.

Minimal example
N/A

Additional context
N/A

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions