anyvar.mapping.projection_models
Define data models for use in variant projection
- class anyvar.mapping.projection_models.ProjectedVariation(destination_variation, mapping)[source]
A projected variation and the mapping used to derive it.
Instances are returned in dependency order so that each mapping’s source variation is either the original input variation or a previously projected variation.
-
mapping:
VariationMapping[source]
-
mapping:
- exception anyvar.mapping.projection_models.ProjectionError[source]
Indicates a failure during variant projection.
- class anyvar.mapping.projection_models.ProjectionFailure(source_id, description, destination_molecule_type=None)[source]
Information describing a failed projection.
Each failure records the destination molecule type that could not be produced along with the corresponding projection error.
- class anyvar.mapping.projection_models.ProjectionNotApplicable(source_id, reason, destination_molecule_type)[source]
A projection that was not applicable to the input variation.
Records the destination molecule type that could not meaningfully be produced and the reason projection was not attempted.
- class anyvar.mapping.projection_models.ProjectionResults(projections=<factory>, failures=<factory>, not_applicable=<factory>)[source]
The outcome of projecting a variation to other molecule types.
Contains successful projections, expected projection failures, and projections that were not applicable to the input variation.
We should try to be specific about what constitutes an error versus “not applicable”: do we know there’s no biological projection possible (ie an untranslated region) or were we simply unable to successfully resolve or calculate projected location or state? The latter should be a “failure”, the former should be “not applicable”
- add(outcome)[source]
Add a single projection outcome to the appropriate collection.
- Return type:
None
-
failures:
list[ProjectionFailure][source]
-
not_applicable:
list[ProjectionNotApplicable][source]
-
projections:
list[ProjectedVariation][source]