ensembl.vep.models.overlap package#
Overlap related data models.
Submodules#
ensembl.vep.models.overlap.custom_variation_allele module#
Custom-feature overlap model.
- class ensembl.vep.models.overlap.custom_variation_allele.CustomVariationAllele(*, feature, overlapping_feature, summary_statistics=dict())[source]#
Bases:
FeatureOverlapRepresent an association between a custom feature and variation allele.
- Variables:
feature (CustomFeature) – The custom record represented as a feature.
overlapping_feature (VariationAllele) – The associated input allele.
summary_statistics (dict[str, object]) – Track- or annotator-derived summary values.
- feature: CustomFeature#
- property feature_overlap_fraction: float#
Return the fraction of the custom feature sharing reference bases.
- property overlap_length: int#
Return the number of shared reference bases.
- overlapping_feature: VariationAllele#
- summary_statistics: dict[str, object]#
- property variation_overlap_fraction: float | None#
Return the fraction of the allele’s reference span shared with the feature.
Insertions have no reference span, so their fraction is undefined even when the selected matcher associates the insertion point with this record.
ensembl.vep.models.overlap.feature_overlap module#
FeatureOverlap class.
- class ensembl.vep.models.overlap.feature_overlap.FeatureOverlap(*, feature, overlapping_feature)[source]#
Bases:
objectRepresents an overlap between a feature and a overlapping feature, along with the consequences of that overlap.
- Variables:
feature (Feature) – The feature that is getting overlapped.
overlapping_feature (Feature) – The feature that is overlapping.
overlap_consequences (list[OverlapConsequence]) – A list of consequences the overlapping feature has on the feature.
- property consequence_terms: set[str]#
Public accessor for _consequence_terms.
- Returns:
A set of all consequence terms.
- Return type:
set[str]
- property most_severe_consequence: OverlapConsequence | None#
Public accessor for _most_severe_consequence.
- Returns:
The most severe consequence, or None if there are no consequences.
- Return type:
OverlapConsequence | None
- overlap_consequences: list[OverlapConsequence]#
ensembl.vep.models.overlap.multiple_feature_overlap module#
MultipleFeatureOverlap class.
- class ensembl.vep.models.overlap.multiple_feature_overlap.MultipleFeatureOverlap(*, feature, overlapping_features)[source]#
Bases:
objectRepresents an overlap between a feature and multiple overlapping features, along with the consequences of that overlap.
- Variables:
feature (Feature) – The feature that is getting overlapped.
overlapping_features (list[Feature]) – The features that are overlapping.
overlap_consequences (list[OverlapConsequence]) – A list of consequences the overlapping features have on the feature.
- overlap_consequences: list[OverlapConsequence]#
ensembl.vep.models.overlap.overlap_consequence module#
OverlapConsequence class.
- class ensembl.vep.models.overlap.overlap_consequence.OverlapConsequence(*, term, accession, is_default=False, rank=0, tier=0, impact=ConsequenceImpact.LOW, feature_type=<class 'ensembl.vep.models.feature.Feature'>, overlapping_feature_type=<class 'ensembl.vep.models.feature.Feature'>)[source]#
Bases:
objectA predicted consequence of an overlap between a feature and a base feature.
This is typically used to represent the consequence of a variant on a transcript, but it can be used for any type of feature overlap.
- Variables:
term (str) – The SO term for the consequence, e.g. “missense_variant”.
accession (str) – The SO accession for the consequence, e.g. “SO:0001583”.
is_default (bool) – Whether this consequence is the default consequence for the overlapping feature. Only one consequence can be default, for transcript variation allele it is generally intergenic_variant.
rank (int) – The rank of the consequence, with 1 being the most severe.
tier (int) – The tier of the consequence. If tier 1 consequence are assigned, then no tier 2 consequences will be checked or assigned.
impact (ConsequenceImpact | None) – The predicted impact of the consequence, e.g. “HIGH”, “MODERATE”, “LOW”, “MODIFIER”.
feature_type (type[Feature] | None) – The type of the overlapped feature that is affected by this consequence type, e.g. Transcript.
overlapping_feature_type (type[Feature] | None) – The type of the overlapping feature that causes this consequence type, e.g. VariationAllele.
- accession: str#
- impact: ConsequenceImpact | None#
- is_default: bool#
- rank: int#
- term: str#
- tier: int#
ensembl.vep.models.overlap.transcript_structural_variation_allele module#
TranscriptStructuralVariationAllele class.
- class ensembl.vep.models.overlap.transcript_structural_variation_allele.TranscriptStructuralVariationAllele(*, feature, overlapping_feature, is_reference=False, readthrough=Readthrough.NONE)[source]#
Bases:
TranscriptVariationAlleleRepresents the overlap between a transcript and a structural variation allele.
- Variables:
exon_numbers (list[int]) – The exon numbers of the transcript that are overlapped by the structural variation allele.
intron_numbers (list[int]) – The intron numbers of the transcript that are overlapped by the structural variation allele.
- exon_numbers: list[int]#
- intron_numbers: list[int]#
ensembl.vep.models.overlap.transcript_variation_allele module#
TranscriptVariationAllele class.
- ensembl.vep.models.overlap.transcript_variation_allele.MAX_READTHROUGH_BASES = 1000#
Cap on how far
Readthrough.BEYOND_TRANSCRIPTreads past a transcript’s own boundary.
- ensembl.vep.models.overlap.transcript_variation_allele.Position#
1-based positions. Primarily used for a variant’s 5’ and 3’ ends on a transcript sequence, None for an end that lies off it
alias of
tuple[int|None,int|None]
- class ensembl.vep.models.overlap.transcript_variation_allele.TranscriptVariationAllele(*, feature, overlapping_feature, is_reference=False, readthrough=Readthrough.NONE)[source]#
Bases:
FeatureOverlapRepresents the overlap between a transcript and a variation allele.
- Variables:
feature (Transcript) – The transcript that is getting overlapped.
overlapping_feature (VariationAllele) – The variation allele that is overlapping.
is_reference (bool) – Whether the overlapping variation allele is the reference allele.
cdna_position (Position | None) – The variant’s position on the spliced transcript, or None if it touches no exon.
cds_position (Position | None) – The variant’s position on the CDS, counted from a whole first codon, or None if it does not touch the CDS.
protein_position (Position | None) – The residues the variant’s two ends fall in, or None if it does not touch the CDS.
distance_to_transcript (int | None) – The distance from the variation allele to the transcript, or None if the variation allele overlaps the transcript.
exon_number (int | None) – The exon number of the transcript that is overlapped by the variation allele, or None if the variation allele does not overlap any exon.
intron_number (int | None) – The intron number of the transcript that is overlapped by the variation allele, or None if the variation allele does not overlap any intron.
reference_codon (str | None) – The reference allele’s whole-codon window in the CDS (transcript-sense), covering every codon touched by the variant, or None if the variant does not overlap the CDS. Cased for display as VEP writes it: lower case but for the allele’s own bases.
alternate_codon (str | None) – The alternate allele’s whole-codon window in the CDS (transcript-sense), i.e. reference_codon with the variant allele spliced in, or None if not applicable. Cased the same way, so a deletion’s is all lower case.
reference_peptide (str | None) – The amino acid translation of reference_codon, or None if not applicable.
alternate_peptide (str | None) – The amino acid translation of alternate_codon, or None if not applicable.
reference_cds (str | None) – The whole reference CDS (transcript-sense, includes the start and stop codon), or None if the transcript has no CDS at all.
alternate_cds (str | None) – The whole reference CDS (transcript-sense) with the variant allele spliced in, or None if not applicable.
reference_cds_peptide (str | None) – The amino acid translation of reference_cds, or None if reference_cds is None.
alternate_cds_peptide (str | None) – The amino acid translation of alternate_cds, or None if alternate_cds is None.
readthrough (Readthrough) – How far translation of alternate_cds may run when the variant destroys the stop codon.
- property alternate_cds: str | None#
Returns the whole CDS with the variant applied.
- Returns:
- The whole CDS with the variant applied, or None if the transcript has no CDS
at all.
- Return type:
str | None
- property alternate_cds_peptide: str | None#
Returns the amino acid translation of the alternate CDS.
- Returns:
The amino acid translation of alternate_cds, or None if not applicable.
- Return type:
str | None
- property alternate_codon: str | None#
Returns the codons variant touches with the variant allele spliced in.
- Returns:
- reference_codon with the variant allele spliced in, or None if not
applicable.
- Return type:
str | None
- property alternate_peptide: str | None#
Returns the amino acid translation of the alternate_codon.
- Returns:
The amino acid translation of alternate_codon, or None if not applicable.
- Return type:
str | None
- property cdna_position: tuple[int | None, int | None] | None#
Public accessor for _cdna_position.
- Returns:
- The variant’s position on the spliced transcript, or None if
it touches no exon.
- Return type:
Position | None
- property cds_length_change: int | None#
Net change in coding length the variant makes, in bases.
Positive for an insertion, negative for a deletion, zero for a substitution. Derived from the CDS edit geometry rather than the cDNA. Any intronic portion of the variant’s genomic span is already discounted, since the offsets come from the mapper’s block-overlap clipping.
- Returns:
- The net coding length change, or None when the variant does not overlap
the CDS and so changes no coding length at all.
- Return type:
int | None
- property cds_position: tuple[int | None, int | None] | None#
Public accessor for _cds_position.
- Returns:
- The variant’s position on the CDS, or None if it does not
touch the CDS.
- Return type:
Position | None
- distance_to_transcript: int | None#
- exon_number: int | None#
- feature: Transcript#
- hgvs_genomic()[source]#
Returns the HGVS genomic notation for this variation allele.
- Return type:
str|None
- hgvs_protein()[source]#
Returns the HGVS protein notation for this variation allele.
- Return type:
str|None
- hgvs_transcript()[source]#
Returns the HGVS transcript notation for this variation allele.
- Return type:
str|None
- intron_number: int | None#
- is_reference: bool#
- property original_cdna_locus: Locus | None#
Public accessor for _original_cdna_locus.
- Returns:
- The original cDNA locus of the variation allele before shifting,
or None if not applicable.
- Return type:
Locus | None
- property original_cds_locus: Locus | None#
Public accessor for _original_cds_locus.
- Returns:
- The original CDS locus of the variation allele before shifting,
or None if not applicable.
- Return type:
Locus | None
- property original_protein_locus: Locus | None#
Public accessor for _original_protein_locus.
- Returns:
- The original protein locus of the variation allele before shifting,
or None if not applicable.
- Return type:
Locus | None
- overlapping_feature: VariationAllele#
- property protein_position: tuple[int | None, int | None] | None#
Public accessor for _protein_position.
- Returns:
- The residues the variant’s two ends fall in, or None if it
does not touch the CDS.
- Return type:
Position | None
- readthrough: Readthrough#
- property reference_cds: str | None#
Returns the whole reference CDS.
- Returns:
- The whole reference CDS (transcript-sense), or None if the transcript has
no CDS at all.
- Return type:
str | None
- property reference_cds_peptide: str | None#
Returns the amino acid translation of the reference CDS.
- Returns:
The amino acid translation of reference_cds, or None if not applicable.
- Return type:
str | None
- property reference_codon: str | None#
Returns the codons variant touches in the reference sequence.
- Returns:
- The reference allele’s whole-codon window (transcript-sense), or None if
the variant does not overlap the CDS.
- Return type:
str | None
- property reference_peptide: str | None#
Returns the amino acid translation of the reference_codon.
- Returns:
The amino acid translation of reference_codon, or None if not applicable.
- Return type:
str | None
- shift()[source]#
Shifts the variation allele to its most 3’ position on the transcript according to HGVS rules.
- property shifted: bool#
Public accessor for _shifted.
- Returns:
True if the allele has been shifted, False otherwise.
- Return type:
bool
- property shifted_cdna_locus: Locus | None#
Public accessor for _shifted_cdna_locus.
- Returns:
- The cDNA locus of the variation allele after shifting,
or None if not applicable.
- Return type:
Locus | None