ensembl.vep.overlaps package#
Overlap finders for source features and input variation alleles.
Submodules#
ensembl.vep.overlaps.base module#
Contracts shared by overlap finders.
- ensembl.vep.overlaps.base.CandidateIntervals#
Build buffer-index query intervals for one source feature.
alias of
Callable[[FeatureT],Iterable[Interval]]
- class ensembl.vep.overlaps.base.CandidateLookup[CandidateFeatureT_co: Feature](*args, **kwargs)[source]#
Bases:
Protocol[CandidateFeatureT_co]Source-candidate lookup for an input buffer.
- class ensembl.vep.overlaps.base.FeatureMatcher(*args, **kwargs)[source]#
Bases:
ProtocolAssociation rule for a feature and variation allele.
- ensembl.vep.overlaps.base.MatchSubject#
Build the interval used for final association of one source feature.
alias of
Callable[[FeatureT],IntervalLike]
- ensembl.vep.overlaps.base.OverlapFactory#
Construct a typed overlap from a matched feature and variation allele.
alias of
Callable[[FeatureT,VariationAllele],OverlapT]
- class ensembl.vep.overlaps.base.OverlapFinder[FoundOverlapT_co: FeatureOverlap](*args, **kwargs)[source]#
Bases:
Protocol[FoundOverlapT_co]Typed-overlap finder for one input buffer.
- class ensembl.vep.overlaps.base.VariationAlleleBuffer(*args, **kwargs)[source]#
Bases:
ProtocolInput buffer exposing variation alleles.
- get_objects_by_intervals(intervals)[source]#
Return alleles that are candidates for any query interval.
- Return type:
list[VariationAllele]
- property objects: Iterable[VariationAllele]#
Return the variation alleles held by the buffer.
ensembl.vep.overlaps.colocated module#
Colocated-variant overlap finding.
- class ensembl.vep.overlaps.colocated.ColocatedVariantOverlapFinder(*, candidate_intervals=<function _feature_intervals>, match_subject=<function _match_feature>, overlap_factory=<function _feature_overlap>, candidates, matcher)[source]#
Bases:
FeatureOverlapFinder[Variation,FeatureOverlap]Known-variant colocation finder for input alleles.
- Variables:
candidates (CandidateLookup[Variation]) – Lookup for known variation candidates.
matcher (FeatureMatcher) – Rule for associating a candidate with an input allele.
- candidates: CandidateLookup[Variation]#
- matcher: FeatureMatcher#
ensembl.vep.overlaps.custom module#
Custom-feature overlap finding.
- class ensembl.vep.overlaps.custom.CustomOverlapFinder(*, candidate_intervals=<function _feature_intervals>, match_subject=<function _match_feature>, overlap_factory=<function _feature_overlap>, candidates, matcher)[source]#
Bases:
FeatureOverlapFinder[CustomFeature,CustomVariationAllele]Custom-feature overlap finder for a variation-allele buffer.
- Variables:
candidates (CandidateLookup[CustomFeature]) – Lookup for custom-feature candidates.
matcher (FeatureMatcher) – Rule for associating a candidate with an input allele.
- candidates: CandidateLookup[CustomFeature]#
- matcher: FeatureMatcher#
ensembl.vep.overlaps.feature module#
Generic feature-overlap finding.
- class ensembl.vep.overlaps.feature.FeatureOverlapFinder[FeatureT: Feature, OverlapT: FeatureOverlap](*, candidates, matcher, candidate_intervals=<function _feature_intervals>, match_subject=<function _match_feature>, overlap_factory=<function _feature_overlap>)[source]#
Bases:
Generic[FeatureT,OverlapT]Overlap finder for source features and variation alleles.
Candidate lookup owns source, cache, and index selection. This keeps the finder independent of the feature source and cache implementations used by a workflow track.
- Variables:
candidates (CandidateLookup[FeatureT]) – Fetch candidates for each input buffer.
candidate_intervals (CandidateIntervals[FeatureT]) – Build buffer-index queries for a feature.
match_subject (MatchSubject[FeatureT]) – Build the final matcher subject for a feature.
matcher (FeatureMatcher) – Decide whether each candidate pair is associated.
overlap_factory (OverlapFactory[FeatureT, OverlapT]) – Construct matched overlap models.
- candidates: CandidateLookup[FeatureT]#
- find(input_buffer)[source]#
Yield overlaps for every matching candidate pair.
- Return type:
Iterator[OverlapT]
- match_subject: Callable[[FeatureT], IntervalLike]#
- matcher: FeatureMatcher#
- overlap_factory: Callable[[FeatureT, VariationAllele], OverlapT]#
ensembl.vep.overlaps.regulatory module#
Regulatory-overlap finding.
- class ensembl.vep.overlaps.regulatory.RegulatoryOverlapFinder(*, candidate_intervals=<function _feature_intervals>, match_subject=<function _match_feature>, overlap_factory=<function _feature_overlap>, candidates, matcher)[source]#
Bases:
FeatureOverlapFinder[Regulatory,FeatureOverlap]Regulatory-feature overlap finder for a variation-allele buffer.
- Variables:
candidates (CandidateLookup[Regulatory]) – Lookup for regulatory-feature candidates.
matcher (FeatureMatcher) – Rule for associating a candidate with an input allele.
- candidates: CandidateLookup[Regulatory]#
- matcher: FeatureMatcher#
ensembl.vep.overlaps.transcript module#
Transcript-overlap finding.
- class ensembl.vep.overlaps.transcript.TranscriptOverlapFinder(*, candidate_intervals=<function _feature_intervals>, match_subject=<function _match_feature>, overlap_factory=<function _feature_overlap>, candidates, matcher, readthrough=Readthrough.NONE, upstream_distance=5000, downstream_distance=5000)[source]#
Bases:
FeatureOverlapFinder[Transcript,TranscriptVariationAllele]Transcript-overlap finder for a variation-allele buffer.
- Variables:
upstream_distance (int) – Genomic bases considered before a transcript’s 5’ end.
downstream_distance (int) – Genomic bases considered past a transcript’s 3’ end.
- candidates: CandidateLookup[Transcript]#
- downstream_distance: int#
- matcher: FeatureMatcher#
- readthrough: Readthrough#
- upstream_distance: int#