from_str#
- classmethod Variant.from_str(string, variant_format=VariantFormat.DEFAULT)[source]#
Creates a
Variantfrom a string representation.- Parameters:
string (
str) – The string representation.variant_format (
VariantFormat(default:<VariantFormat.DEFAULT: 'default'>)) – The format of the variant string. By default, this uses “chromosome:position:ref>alt” (for example, “chr1:1024:A>C”). See VariantFormat for alternate formatting options.
- Return type:
Self- Returns:
A
Variantobject.