anyvar.core.metadata

Define types and classes for metadata, i.e. additional descriptions on top of stored objects.

This currently includes

  • Extensions: free-text key-value descriptions of an object

  • Mappings: directed associations between objects

class anyvar.core.metadata.Extension(**data)[source]

Generic extension class which attaches any object to an identifier

This is implemented in addition to the Extension defined in gks-core because AnyVar needs additional metadata (like a reference ID) to manage it, but conceptually, they’re quite close.

name: str[source]
object_id: str[source]
value: TypeAliasType[source]
class anyvar.core.metadata.ExtensionName(value)[source]

Describe commonly used extension names

CREATION_TIMESTAMP = 'creation_timestamp'[source]
class anyvar.core.metadata.VariationMapping(**data)[source]

Describe a mapping between two variations.

dest_id: str[source]
mapping_type: VariationMappingType[source]
source_id: str[source]
class anyvar.core.metadata.VariationMappingType(value)[source]

Supported mapping types between VRS Variations.

Warning

Currently, use of mappings outside of the liftover relation are experimental, and these parameters are subject to change. The following describes current intentions, and may or may not be validated within AnyVar.

  • LIFTOVER_TO: Genomic-to-genomic coordinate transformation. Use when mapping a variation between two reference sequences of the same molecule type, typically genomic DNA.

  • TRANSCRIBE_TO: Genomic-to-transcript (RNA/cDNA) projection. Use when projecting a genomic DNA object onto a transcript sequence (RNA or cDNA). This accounts for splicing, transcript strand orientation, and transcript-specific exon structure.

  • TRANSLATE_TO: Transcript-to-protein projection. This entails codon interpretation, amino acid substitution/insertion/deletion/extension, and protein coordinate changes.

LIFTOVER_TO = 'liftover_to'[source]
TRANSCRIBE_TO = 'transcribe_to'[source]
TRANSLATE_TO = 'translate_to'[source]