ensembl.vep.matcher package#
Association matchers.
Submodules#
ensembl.vep.matcher.allele module#
Variant-allele association helpers.
- ensembl.vep.matcher.allele.get_matched_variant_alleles(variation_alleles, query, *, match_reference=True, match_alternate=True)[source]#
Return alleles with matching coordinates and selected allele strings.
- Parameters:
variation_alleles (
Iterable[AlleleT]) – Candidate alleles to inspect.query (
AlleleLike) – Coordinate and allele values to match.match_reference (
bool, default:True) – Require equal reference strings.match_alternate (
bool, default:True) – Require equal alternate strings.
- Returns:
Matching candidates in their supplied order.
- Return type:
list[AlleleT]
ensembl.vep.matcher.base module#
Matcher contracts and policies.
- class ensembl.vep.matcher.base.AlleleLike(*args, **kwargs)[source]#
Bases:
IntervalLike,ProtocolCoordinates and allele strings used for colocation.
- property alternate_allele: str | None#
Return the alternate allele string.
- property reference_allele: str | None#
Return the reference allele string.
ensembl.vep.matcher.exact module#
Exact-coordinate association.
ensembl.vep.matcher.overlap module#
General interval-overlap matching.
- class ensembl.vep.matcher.overlap.OverlapMatcher(*, insertion_policy=InsertionMatchPolicy.CONTAINED)[source]#
Bases:
objectMatcher for containing or partially intersecting intervals.
A normal interval uses inclusive base coordinates. An insertion is encoded as
start=end+1and remains a zero-width interbase location during matching.- Variables:
insertion_policy (InsertionMatchPolicy) – Rule for associating an insertion with a feature.
- insertion_policy: InsertionMatchPolicy#
ensembl.vep.matcher.reciprocal module#
Reciprocal interval-overlap association.
- class ensembl.vep.matcher.reciprocal.ReciprocalOverlapMatcher(*, left_minimum=0.5, right_minimum=0.5)[source]#
Bases:
objectMatcher requiring both configured reference-span fractions.
Zero-width insertions never match reciprocally because their reference-span fraction is undefined. Use
OverlapMatcherfor point association orExactCoordinateMatcherfor identical insertion positions.- Variables:
left_minimum (float) – Minimum fraction of the left reference span covered.
right_minimum (float) – Minimum fraction of the right reference span covered.
- left_minimum: float#
- matches(left, right)[source]#
Return whether both intervals meet their configured overlap fraction.
- Return type:
bool
- right_minimum: float#