VariantFormat

Contents

VariantFormat#

class alphagenome.data.genome.VariantFormat(value)[source]#

A format for parsing a string into a Variant object.

This is used to convert from a string to a formal Variant object. Note that it does not perform any validation (e.g. it does not verify that the reference allele corresponds to the reference genome or that the position is valid).

Example formats:

DEFAULT: chr22:1024:A>C GTEX: chr22_1024_A_C_b38 (build suffix is optional) OPEN_TARGETS: 22_1024_A_C (chr prefix is omitted) OPEN_TARGETS_BIGQUERY: 22:1024:A:C (chr prefix is omitted) GNOMAD: 22-1024-A-C (chr prefix is omitted)

Methods

to_regex()

Returns a regular expression for the variant format.