ensembl.vep.models.variation package#
Variation related data models.
Submodules#
ensembl.vep.models.variation.structural_variation module#
StructuralVariation class.
- class ensembl.vep.models.variation.structural_variation.StructuralVariation(*, start, end, strand, slice=None, stable_id=None, allele_string=None, uploaded_locus=None, is_somatic=False, sv_type=None, copy_number=None, inner_start=None, outer_start=None, inner_end=None, outer_end=None)[source]#
Bases:
VariationRepresents a structural variation to genomic sequences in a specific locus.
- Variables:
sv_type (str | None) – Type of the structural variant.
copy_number (float | None) – Number of sequence copies of a structural variant classified as “copy number variant” (CNV) when available.
inner_start (int | None) – The inner bound on the start position when the variant is imprecise
outer_start (int | None) – The outer bound on the start position when the variant is imprecise
inner_end (int | None) – The inner bound on the end position when the variant is imprecise
outer_end (int | None) – The outer bound on the end position when the variant is imprecise
variation_alleles (Sequence[StructuralVariationAllele]) – List of VariationAllele objects describing the alleles of the variation.
- copy_number: int | None#
- inner_end: int | None#
- inner_start: int | None#
- outer_end: int | None#
- outer_start: int | None#
- sv_type: str | None#
- variation_alleles: Sequence[StructuralVariationAllele]#
ensembl.vep.models.variation.structural_variation_allele module#
StructuralVariationAllele class.
- class ensembl.vep.models.variation.structural_variation_allele.StructuralVariationAllele(*, strand, slice=None, start, end, reference_allele=None, alternate_allele=None, variation=None, svlen=None)[source]#
Bases:
VariationAlleleRepresents a specific allele of a structural variation.
- Variables:
svlen (int | None) – The length of the structural variant
- minimise(force=False)[source]#
Minimises the variation allele by computing the minimal representation of the variant.
Structural variants are not minimised, so this method simply returns the current representation of the structural variant.
- shift(force=False)[source]#
Shifts the variation allele to the leftmost position in the sequence.
Currently, this method simply returns the current representation of the structural variant.
- svlen: int | None#
ensembl.vep.models.variation.variation module#
Variation class.
- class ensembl.vep.models.variation.variation.Variation(*, start, end, strand, slice=None, stable_id=None, allele_string=None, uploaded_locus=None, is_somatic=False)[source]#
Bases:
FeatureRepresents a variation to genomic sequences in a specific locus.
- Variables:
stable_id (str | None) – Stable identifier for the variation.
allele_string (str | None) – String representation of the alleles.
uploaded_locus (Locus | None) – Original region name, position and allele string supplied by the variation source. Its
seq_region_nameis what output reports and what a run summary counts by; the slice names the same region as the annotation sources spell it.variation_alleles (list[VariationAllele] | None) – List of VariationAllele objects describing the alleles of the variation.
is_somatic (bool | None) – Indicates whether the variation is somatic.
class_so_term (str | None) – Sequence Ontology term describing the class of the variation.
most_severe_consequence (OverlapConsequence | None) – Most severe consequence type for the variation.
- allele_string: str | None#
- property class_so_term: ClassSOTerm | None#
Public accessor for the _class_so_term.
- Returns:
The SO term for the class of the variation.
- Return type:
ClassSOTerm | None
- is_somatic: bool#
- property most_severe_consequence: OverlapConsequence | None#
Public accessor for the _most_severe_consequence.
- Returns:
- The most severe consequence type for the variation
or None if not deducible.
- Return type:
OverlapConsequence | None
- stable_id: str | None#
- property variation_alleles: Sequence[VariationAllele]#
Public accessor for the _variation_alleles.
- Returns:
The list of VariationAllele objects for the variation.
- Return type:
Sequence[VariationAllele]
ensembl.vep.models.variation.variation_allele module#
VariationAllele class.
- class ensembl.vep.models.variation.variation_allele.VariationAllele(*, strand, slice=None, start, end, reference_allele=None, alternate_allele=None, variation=None)[source]#
Bases:
FeatureRepresents a specific allele of a variation.
- Variables:
start (int) – The start position in relative to slice.
end (int) – The end position in relative to slice.
reference_allele (str | None) – The reference allele.
alternate_allele (str | None) – The alternate allele.
variation (Variation | None) – Variation that owns this allele.
transcript_variation_alleles (list[TranscriptVariationAllele]) – List of overlaps between this variation allele and transcripts.
original_locus (Locus | None) – The original locus of the variation allele before any minimisation or shifting.
minimised_locus (Locus | None) – The locus of the variation allele after minimisation.
shifted_locus (Locus | None) – The locus of the variation allele after shifting.
minimised (bool) – Whether the variation allele has been minimised.
shifted (bool) – Whether the variation allele has been shifted.
- alternate_allele: str | None#
- property display_name: str#
Return a unique displayable name this allele is identified by.
The variation stable_id for a multi-allelic record is not unique for each allele. This allele’s alternate is appended to make it unique. If there is not stable_id generate the name using locus.
- Returns:
- The variant’s identifier, that identifier and this alternate allele, or this
allele’s locus name.
- Return type:
str
- end: int#
- get_all_featureoverlaps()[source]#
Returns all feature overlaps for this variation allele.
- Returns:
A list of all feature overlaps for this variation allele.
- Return type:
Sequence[FeatureOverlap]
- minimise(force=False)[source]#
Minimises the variation allele by computing the minimal representation of the variant.
This method also stores the original locus information before minimisation.
- Parameters:
force (
bool, default:False) – If True, force minimisation even if already minimised.- Raises:
ValueError – If reference or alternate allele is None.
- property minimised: bool#
Public accessor for _minimised.
- Returns:
True if the variation allele has been minimised, False otherwise.
- Return type:
bool
- property minimised_locus: Locus | None#
Public accessor for _minimised_locus.
- Returns:
The minimised locus if available, None otherwise.
- Return type:
Locus | None
- property original_locus: Locus | None#
Public accessor for _original_locus.
- Returns:
The original locus if available, None otherwise.
- Return type:
Locus | None
- property overlap_consequences: list[OverlapConsequence]#
Public accessor for _overlap_consequences.
- Returns:
The list of overlap consequences for this variation allele.
- Return type:
list[OverlapConsequence]
- reference_allele: str | None#
- shift(force=False)[source]#
Shifts the variation allele to the leftmost position in the sequence.
This method also stores the original locus information before shifting.
- Parameters:
force (
bool, default:False) – If True, force shifting even if already shifted.- Raises:
ValueError – If reference or alternate allele is None.
- property shifted: bool#
Public accessor for _shifted.
- Returns:
True if the variation allele has been shifted, False otherwise.
- Return type:
bool
- property shifted_locus: Locus | None#
Public accessor for _shifted_locus.
- Returns:
The shifted locus if available, None otherwise.
- Return type:
Locus | None
- start: int#
- transcript_variation_alleles: list[TranscriptVariationAllele]#