Skip to content

fix(orftable_fasta_gtf_buildorfcatalogue): keep meta.id as the true sample id - #12896

Merged
pinin4fjords merged 5 commits into
nf-core:masterfrom
pinin4fjords:fix/orfcatalogue-caller-identity
Sep 8, 2026
Merged

fix(orftable_fasta_gtf_buildorfcatalogue): keep meta.id as the true sample id#12896
pinin4fjords merged 5 commits into
nf-core:masterfrom
pinin4fjords:fix/orfcatalogue-caller-identity

Conversation

@pinin4fjords

Copy link
Copy Markdown
Member

Summary

ORFTABLE_FASTA_GTF_BUILDORFCATALOGUE disambiguates CUSTOM_ORFNORMALISE's output filenames per caller by appending the caller name to meta.id ("${meta.id}.${caller}") before calling the module. But CUSTOM_ORFNORMALISE writes meta.id straight through into each row's sample_id column, and CUSTOM_ORFMERGE's consensus view counts distinct sample_ids for n_samples/--min-samples filtering. So an ORF called by two different callers on the same sample gets counted as two samples, not one — corrupting the published n_samples/samples catalogue columns, and the --min-samples consensus filter for anyone raising it above the default of 1.

The subworkflow's own doc comment already states the intended contract ("caller id carried as a per-record val (not in meta)") — the code just didn't follow it.

What changed

  • ch_normalise_in now sets meta.caller instead of mutating meta.id.
  • Added an ext.prefix override in this subworkflow's own nextflow.config ("${meta.id}.${meta.caller}.normalised") to keep output filenames byte-identical to before, following the exact convention already established in custom/orfmerge's own test fixture (tests/setup_prefix.config).

No test changes needed — the existing ribotish + ribocode test already exercises two callers on the same sample id (sample1), and its snapshot now correctly shows sample_id = sample1 (was sample1.ribotish/sample1.ribocode).

Found while reviewing nf-core/riboseq's v2.0.0 release PR, which vendors this subworkflow.

jonasscheid and others added 3 commits September 7, 2026 15:36
Missed pushing this from the VM verification run earlier - the code
fix was correct but the committed snapshot still had the old
(sample1.ribotish/sample1.ribocode) sample_id content hash.
Comment thread subworkflows/nf-core/orftable_fasta_gtf_buildorfcatalogue/main.nf Outdated
ext.prefix/ext.args config closures see every declared process input
by name, not just meta - confirmed empirically. No need to duplicate
caller into meta just to reach it from config.
pinin4fjords added a commit to nf-core/riboseq that referenced this pull request Sep 8, 2026
…orfcatalogue

Drop meta.caller, reference caller directly in ext.prefix - config
closures see every declared process input by name, not just meta.
Matches nf-core/modules#12896 after reviewer feedback. Output is
byte-identical, no snapshot changes needed.
@pinin4fjords
pinin4fjords added this pull request to the merge queue Sep 8, 2026
Merged via the queue into nf-core:master with commit 7baf88e Sep 8, 2026
22 checks passed
@pinin4fjords
pinin4fjords deleted the fix/orfcatalogue-caller-identity branch September 8, 2026 09:49
pinin4fjords added a commit to nf-core/riboseq that referenced this pull request Sep 8, 2026
…mits

fastq_qc_trim_filter_setstrandedness -> 0853b48c (nf-core/modules#12895)
orftable_fasta_gtf_buildorfcatalogue -> 7baf88e0 (nf-core/modules#12896)

Both PRs are merged. Synced modules.json and the two changed files to
their exact merge-commit content (not current master HEAD, to avoid
pulling in unrelated later changes). orftable_fasta_gtf_buildorfcatalogue
was already byte-identical (riboseq's copy already matched). Resolves
the check_local_copy lint failures that were expected pending these
merges.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants