gtffilter: add support for non-Ensembl GTF files#12393
Open
kanishkanandhkumar wants to merge 3 commits into
Open
gtffilter: add support for non-Ensembl GTF files#12393kanishkanandhkumar wants to merge 3 commits into
kanishkanandhkumar wants to merge 3 commits into
Conversation
kanishkanandhkumar
requested review from
ewels,
mashehu and
nictru
and removed request for
ewels and
mashehu
July 21, 2026 16:32
kanishkanandhkumar
enabled auto-merge
July 21, 2026 16:32
mashehu
reviewed
Jul 22, 2026
mashehu
reviewed
Jul 22, 2026
Comment on lines
-42
to
-47
| Args: | ||
| data (dict): The dictionary to format. | ||
| indent (int): The current indentation level. | ||
|
|
||
| Returns: | ||
| str: A string formatted as YAML. |
Contributor
There was a problem hiding this comment.
please don't remove comments
Co-authored-by: Matthias Hörtenhuber <mashehu@users.noreply.github.com>
mashehu
disabled auto-merge
July 22, 2026 17:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.