Skip to content

feat(ribotish/predict): optional reference_gtf input + topics versions + 0.2.8#11686

Open
pinin4fjords wants to merge 2 commits into
masterfrom
ribotish-predict-optional-reference-gtf
Open

feat(ribotish/predict): optional reference_gtf input + topics versions + 0.2.8#11686
pinin4fjords wants to merge 2 commits into
masterfrom
ribotish-predict-optional-reference-gtf

Conversation

@pinin4fjords
Copy link
Copy Markdown
Member

@pinin4fjords pinin4fjords commented May 18, 2026

Adds an optional secondary GTF input to ribotish predict (so callers can supply a MANE/RefSeq-style overlay via -a while keeping the primary GTF on -g), and brings the module up to current nf-core conventions.

Changes

  • New optional input: tuple val(meta7), path(reference_gtf, stageAs: 'secondary.gtf'). When populated, plumbed through as -a <reference_gtf> on the ribotish command line. Lives in its own tuple - matches the pattern this module already uses for bam_ti, candidate_orfs, para_ribo, para_ti. Existing (meta3, fasta, gtf) signature is preserved, so consumers add a single new input channel rather than restructuring an existing tuple.
  • Topic-based versions: legacy path "versions.yml" emit + cat <<-END_VERSIONS heredoc replaced with tuple val("${task.process}"), val('ribotish'), eval("ribotish --version | sed 's/ribotish //'"), topic: versions, emit: versions_ribotish. meta.yml regenerated via nf-core modules lint --fix (adds the topics: block and reshapes the versions_ribotish output entry).
  • Bump ribotish 0.2.7 → 0.2.8 (bioconda; same build hash, container URLs and environment.yml updated).

Test plan

nf-core modules test --profile docker ribotish/predict runs all four cases green (single/multi ribo bam × main/stub). Snapshot regenerated:

  • versions_* keys renamed to versions_ribotish_* (matching the new emit name).
  • Version string 0.2.70.2.8.
  • Prediction-table assertions unchanged - 0.2.8 is a patch release.

Caller migration

Existing callers must add a 7th input slot. Pass Channel.of([[], []]) (or [[id:'reference'], []]) for the no-op case; pass a populated [meta, gtf_path] to use -a.

Source: nf-core/riboseq#174. Supersedes the ribotish half of #11684.

Carried in nf-core/riboseq#174 and split out of the bundled PR
#11684.

**Breaking signature change.** The third input tuple gains an optional
fourth element, `reference_gtf`, plumbed through to `ribotish predict`
as `-a <gtf>` when populated:

    tuple val(meta3), path(fasta), path(gtf), path(reference_gtf, stageAs: 'secondary.gtf')

Callers must supply a fourth element on every emit. Pass `[]` for the
no-op case (no secondary annotation). The existing test cases in this
PR are migrated that way; positive-coverage tests for the populated
path will land in a follow-up.

Why: Ribo-TISH's `-a` argument is the documented hook for layering a
secondary annotation (e.g. MANE/RefSeq) on top of the primary GTF, and
we want to expose it from the module without a second optional input
tuple.

Source: nf-core/riboseq#174

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… topics versions + bump 0.2.8

Three coupled cleanups in response to the lint feedback on PR #11686:

1. Move the new `reference_gtf` input out of the existing fasta/gtf tuple
   and into its own optional input tuple (meta7) - the convention this
   module already uses for `bam_ti`, `candidate_orfs`, `para_ribo`, and
   `para_ti`. The existing `(meta3, fasta, gtf)` signature is preserved,
   so callers no longer need to grow that tuple; they wire a separate
   `Channel.of([[], []])` (or a populated channel) into the new slot.

2. Migrate version reporting from the legacy `versions.yml` heredoc to the
   new topic-based emission (`tuple val("${task.process}"), val('ribotish'),
   eval('...'), topic: versions, emit: versions_ribotish`). The
   `versions.yml` heredoc is removed from both `script:` and `stub:`.
   `meta.yml` regenerated by `nf-core modules lint --fix` to add the
   `topics:` block and reshape the `versions_ribotish` output entry.

3. Bump ribotish from 0.2.7 to 0.2.8 (bioconda; build hash unchanged).

Test snapshot regenerated under `--update`: versions snapshot key renamed
from `versions_*` to `versions_ribotish_*`, version string updated to
`0.2.8`. Prediction-table assertions unchanged - 0.2.8 is a patch release.

Source: nf-core/riboseq#174

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@pinin4fjords pinin4fjords changed the title feat(ribotish/predict): add optional secondary reference GTF for -a feat(ribotish/predict): optional reference_gtf input + topics versions + 0.2.8 May 18, 2026
@github-actions github-actions Bot added size/m and removed size/s labels May 18, 2026
@pinin4fjords pinin4fjords marked this pull request as ready for review May 18, 2026 16:54
@SPPearce
Copy link
Copy Markdown
Contributor

Dear Claude, can you update the nf-test structure while you are at it, so that each test only has one snapshot (which doesn't need a name)

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants