public class Haplotype
A Haplotype is a sequence which can be either a true haplotype or a genotype. The natural ordering is by number of non-missing values, descending.
public kotlin.Array[] seq
The haplotype (or genotype) sequence
public int notMissingCount
The number of non missing values in the sequence
public int seqlen
The length of the sequence
public static byte N
The byte value for missing
public int taxonIndex
The index of the taxon from the originating alignment from which this sequence was taken
public Haplotype(kotlin.Array[] hap,
int taxon)
hap - the haplotype or genotype sequencetaxon - the taxon indexpublic Haplotype(kotlin.Array[] hap)
hap - the haplotype or genotype sequencepublic kotlin.Array[] makeHetsConsistent(kotlin.Array[] seqIn)
public void countNotMissing()
public int compareTo(Haplotype arg0)
public int numberOfHets()
public int distanceFrom(Haplotype h0)
Distance is defined as the sum of the distances between each pair of sites. If one or both of the sites are missing then the distance is zero. If the sites are equal the distance is zero. If both sites are homozygous but different, the distance is 2. If one site is heterozygous, the distance is 1.
h0 - another Haplotype. Both haplotypes must have the same sequence length.public Haplotype subHaplotype(int size, boolean fromStart)
public static int getDistance(Haplotype hap0, Haplotype hap1)
hap0 - the first Haplotypehap1 - the second Haplotypepublic static int getDistance(kotlin.Array[] hap0,
kotlin.Array[] hap1)
hap0 - the first Haplotypehap1 - the second Haplotype#distanceFrom(Haplotype h0)public java.lang.String toString()