Fix #169: three-tier protein-coding biotype ontology#357
Merged
Conversation
Introduces a layered set of flags for "does this transcript make a
polypeptide?":
* `is_protein_coding` - unchanged, strict canonical `protein_coding`
only. Preserves the contract downstream effect predictors (varcode)
depend on.
* `is_protein_coding_extended` - widens to IG/TR gene segments and
translated pseudogenes (`polymorphic_pseudogene`,
`translated_{processed,unprocessed}_pseudogene`). Excludes NMD/NSD
because those products are targeted for degradation rather than
stable accumulation.
* `is_translated` - widest tier. Adds `nonsense_mediated_decay` and
`non_stop_decay` on top of the extended set. Useful when picking the
top variant effect or doing RNA-seq peptide analysis where ribosome
occupancy matters more than stable expression.
Set constants `PROTEIN_CODING_BIOTYPES`,
`EXTENDED_PROTEIN_CODING_BIOTYPES`, and `TRANSLATED_BIOTYPES` are
exposed on `pyensembl.locus_with_genome` so callers can derive their
own categorization if needed.
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.
Summary
Resolves #169. Adds a layered set of biotype flags for "does this transcript make a polypeptide?":
is_protein_coding— unchanged. Strict canonicalprotein_codingonly. Preserves the contract that downstream effect predictors (e.g. varcode) depend on.is_protein_coding_extended— widens to IG/TR gene segments and translated pseudogenes:IG_{C,D,J,V}_gene,TR_{C,D,J,V}_gene— produce protein after V(D)J recombinationpolymorphic_pseudogene— codes for protein in some individualstranslated_{processed,unprocessed}_pseudogene— pseudogenes with translation evidenceis_translated— widest tier. Addsnonsense_mediated_decayandnon_stop_decayon top. Useful when picking a top variant effect or doing RNA-seq peptide analysis where ribosome occupancy matters more than stable expression.The invariant
strict ⊂ extended ⊂ translatedholds and is tested.The set constants
PROTEIN_CODING_BIOTYPES,EXTENDED_PROTEIN_CODING_BIOTYPES, andTRANSLATED_BIOTYPESare exported frompyensembl.locus_with_genomefor callers who want to derive their own categorization.Test plan
tests/test_extended_protein_coding.pycovers:biotype=Nonepytestpasses locally (56 passed)ruff checkclean