public class NucleotideAlignmentConstants
public static byte A_ALLELE
public static byte C_ALLELE
public static byte G_ALLELE
public static byte T_ALLELE
public static byte INSERT_ALLELE
public static byte GAP_ALLELE
public static byte UNDEFINED_ALLELE
public static byte A_DIPLOID_ALLELE
public static byte C_DIPLOID_ALLELE
public static byte G_DIPLOID_ALLELE
public static byte T_DIPLOID_ALLELE
public static byte INSERT_DIPLOID_ALLELE
public static byte GAP_DIPLOID_ALLELE
public static byte UNDEFINED_DIPLOID_ALLELE
public static java.lang.String INSERT_ALLELE_STR
public static java.lang.String GAP_ALLELE_STR
public static char GAP_ALLELE_CHAR
public static java.lang.String UNDEFINED_ALLELE_STR
public static java.lang.String[] NUCLEOTIDE_ALLELES
public static int NUMBER_NUCLEOTIDE_ALLELES
Number of nucleotide states excluding rare and unknown.
public static java.util.Map<java.lang.Byte,java.lang.String> NUCLEOTIDE_IUPAC_HASH
public static byte getNucleotideDiploidByte(java.lang.String value)
Returns diploid byte value for given nucleotide value. First four bits contain first allele value. And second four bits contain second allele value.
value - diploid allele valuepublic static java.util.Optional<java.lang.Byte> parseNucleotideDiploidByte(java.lang.String value)
Returns Optional diploid byte value for given nucleotide value. First four bits contain first allele value. And second four bits contain second allele value. Optional empty if not present in the Hash.
value - diploid allele valuepublic static java.lang.Object getNucleotideAlleleValue(byte value)
Returns char allele for allele byte encoding. THis is called from junit tests in ReferenceGenomeSequenceTest.java
value - haploid allele byte valuepublic static byte getNucleotideAlleleByte(java.lang.String value)
Returns haploid byte value for given nucleotide value. Only right-most four bits used.
value - haploid allele valuepublic static byte getNucleotideAlleleByte(char value)
Returns haploid byte value for given nucleotide value. Only right-most four bits used.
value - haploid allele valuepublic static byte getNucleotideDiploidByte(char value)
Returns diploid byte value for given nucleotide value. First four bits contain first allele value. And second four bits contain second allele value.
value - diploid allele valuepublic static java.lang.String getNucleotideIUPAC(byte value)
Returns the IUPAC String for the given diploid allele value.
value - diploid allele valuepublic static char getNucleotideIUPACChar(byte value)
Returns the IUPAC char for the given diploid allele value.
value - diploid allele valuepublic static java.lang.String getHaplotypeNucleotide(byte value)
Returns the Nucleotide String for the given haploid allele value.
value - haploid valuepublic static byte getNucleotideComplement(byte nucleotide)
Returns the Nucleotide Complement of given byte encoded nucleotide. A returns T. T returns A. C returns G. G returns C. Otherwise given nucleotide is returned.
nucleotide - nucleotide byte valuepublic static byte getNucleotideDiploidComplement(byte diploidAllele)
Returns the Nucleotide Complement of the given diploid byte encoded alleles.
diploidAllele - diploid allele valuepublic static char getNucleotideDiploidIUPACComplement(char diploidAllele)
Returns the Nucleotide Complement of the given diploid IUPAC encoded alleles.
diploidAllele - diploid IUPACpublic static boolean isNucleotideEncodings(java.lang.String[] alleleStates)
Returns whether given allele encodings are for Nucleotide Data.
alleleStates - allele encodingspublic static kotlin.Array[] convertHaplotypeStringToAlleleByteArray(java.lang.String haploString)
Convert a haploid (allele) string (e.g. ACGTA) to arrays of allele bytes (e.g. {0,1,2,3,0})
haploString - haploid allele stringpublic static kotlin.Array[] convertGenotypeStringToDiploidByteArray(java.lang.String diploidString)
Convert a genotype (diploid) string (e.g. ACGTA) to arrays of diploid bytes (e.g. {0,17,34,51,0})
diploidString - haploid allele stringpublic static kotlin.Array[] reverseComplementAlleleByteArray(kotlin.Array[] alleles)
Convert a haploid (allele) string (e.g. {0,1,2,3,0}) to its reverse complement (e.g. {3,0,1,2,3})
alleles - haploid allele bytepublic static java.lang.String nucleotideBytetoString(kotlin.Array[] b)
Convert a nucleotide byte array to a string
b - the array of nucleotide bytes to convertpublic static boolean isHomozygousACGT(java.lang.Byte diploidAllele)
Return whether a simple homozgyous DNA state (i.e. no indels or N).
diploidAllele - diploidpublic static boolean isACGT(java.lang.Byte diploidAllele)
Return whether a simple DNA state (i.e. no indels or N). Heterozygous resolves to true also.
diploidAllele - diploid