AltAllele¶
-
class
hail.representation.AltAllele(ref, alt)[source]¶ An object that represents an allele in a polymorphism deviating from the reference allele.
Parameters: - ref (str) – reference allele
- alt (str) – alternate allele
Attributes
altAlternate allele. refReference allele. Methods
__init__x.__init__(…) initializes x; see help(type(x)) for signature categoryReturns the type of alt, i.e one of SNP, Insertion, Deletion, Star, MNP, Complex is_MNPTrue if this alternate allele is a multiple nucleotide polymorphism (MNP) is_SNPTrue if this alternate allele is a single nucleotide polymorphism (SNP) is_complexTrue if this alternate allele does not fit into the categories of SNP, MNP, Insertion, or Deletion is_deletionTrue if this alternate allele is a deletion of one or more bases is_indelTrue if this alternate allele is either an insertion or deletion of one or more bases is_insertionTrue if this alternate allele is an insertion of one or more bases is_transitionTrue if this alternate allele is a transition SNP. is_transversionTrue if this alternate allele is a transversion SNP. num_mismatchReturns the number of mismatched bases in this alternate allele. stripped_snpReturns the one-character reduced SNP. -
alt¶ Alternate allele.
Return type: str
-
category()[source]¶ - Returns the type of alt, i.e one of
- SNP, Insertion, Deletion, Star, MNP, Complex
Return type: str
-
is_MNP()[source]¶ True if this alternate allele is a multiple nucleotide polymorphism (MNP)
Return type: bool
-
is_SNP()[source]¶ True if this alternate allele is a single nucleotide polymorphism (SNP)
Return type: bool
-
is_complex()[source]¶ True if this alternate allele does not fit into the categories of SNP, MNP, Insertion, or Deletion
Return type: bool
-
is_deletion()[source]¶ True if this alternate allele is a deletion of one or more bases
Return type: bool
-
is_indel()[source]¶ True if this alternate allele is either an insertion or deletion of one or more bases
Return type: bool
-
is_insertion()[source]¶ True if this alternate allele is an insertion of one or more bases
Return type: bool
-
is_transition()[source]¶ True if this alternate allele is a transition SNP.
This is true if the reference and alternate bases are both purine (A/G) or both pyrimidine (C/T). This method raises an exception if the polymorphism is not a SNP.
Return type: bool
-
is_transversion()[source]¶ True if this alternate allele is a transversion SNP.
This is true if the reference and alternate bases contain one purine (A/G) and one pyrimidine (C/T). This method raises an exception if the polymorphism is not a SNP.
Return type: bool
-
num_mismatch()[source]¶ Returns the number of mismatched bases in this alternate allele.
Fails if the ref and alt alleles are not the same length.
Return type: int
-
ref¶ Reference allele.
Return type: str