Skip to content

feat(ribotish/predict): expose optional secondary annotation GTF input (-a flag) #11644

@pinin4fjords

Description

@pinin4fjords

Summary

ribotish predict accepts a -a flag for a secondary annotation file, used for ORF background modelling and TisType classification independently of the primary discovery target (-g). The current nf-core module exposes only a single GTF input. This PR adds the optional second input.

Use case: when the nf-core/riboseq pipeline discovers ORFs on novel StringTie transcripts (no CDS), passing the canonical annotation separately via -a allows Ribo-TISH to correctly classify ORF types (Novel, CDSFrameOverlap, 5utr, etc.) and model translation background against known coding sequences, while scanning only the novel transcripts for new calls.

Change

input:
    tuple val(meta), path(bam), path(bai)
    path(gtf)                // -g: discovery target
    path(reference_gtf)      // -a: optional; secondary annotation for classification

Script block:

def secondary_gtf = reference_gtf.name != 'NO_FILE' ? "-a ${reference_gtf}" : ""

ribotish predict \
    ${args} \
    -b ${bam} \
    -g ${gtf} \
    ${secondary_gtf} \
    ...

Declare reference_gtf as optional (use path(reference_gtf, stageAs: 'NO_FILE', optional: true) or equivalent) so existing callers passing a single GTF continue to work without modification.

References

Required by: nf-core/riboseq novel ORF discovery wiring (companion pipeline issue: nf-core/riboseq#163)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions