Skip to content

fix(gtffilter): add support for non-Ensembl GTF files. - #1890

Open
kanishkanandhkumar wants to merge 1 commit into
nf-core:devfrom
kanishkanandhkumar:feature/non-ensembl-gtf-support
Open

fix(gtffilter): add support for non-Ensembl GTF files.#1890
kanishkanandhkumar wants to merge 1 commit into
nf-core:devfrom
kanishkanandhkumar:feature/non-ensembl-gtf-support

Conversation

@kanishkanandhkumar

Copy link
Copy Markdown

Description of Changes

This PR updates modules/nf-core/custom/gtffilter/templates/gtffilter.py to support non-Ensembl GTF annotations (e.g., NCBI/RefSeq, GENCODE, FlyBase, TAIR).

Summary of fixes:

  • Header/Comment preservation: Updated parsing to retain lines starting with # without triggering column-count validation errors.
  • Flexible transcript_id matching: Replaced strict Ensembl regex (transcript_id "...") with a flexible regex pattern to match unquoted, single-quoted, and =-separated attributes (e.g., transcript_id=TX123).
  • Top-level gene retention: Ensured top-level gene feature entries are preserved even when they lack a transcript_id attribute.
  • Gzip support fix: Fixed tab_delimited() validation so .gtf.gz compressed inputs are properly uncompressed during checking rather than throwing column count errors.

Type of Change

  • Bug fix (non-breaking change fixing an issue)
  • New feature
  • Documentation update

Verification

  • Ran nf-core modules lint custom/gtffilter locally (Passed 45/45 tests).
  • Verified python script syntax and execution.

@pinin4fjords pinin4fjords left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kanishkanandhkumar - sorry, but this is an nf-core module, so you'll need to propose this change in the nf-core/modules repo, get it merged there, then do nf-core modules update ... for this module in your rnaseq copy before you PR here.

Be sure you've joined the nf-core Slack, you can ask for review on module updates there in the request-review channel there.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants