| Constructor | Description |
|---|---|
BasicGT(Samples samples,
GTRec[] vma) |
Constructs a
BasicGT instance. |
| Modifier and Type | Method | Description |
|---|---|---|
int |
allele(int marker,
int hap) |
Returns the allele on the specified haplotype for the specified marker
or return -1 if the allele is missing.
|
int |
allele1(int marker,
int sample) |
Returns the first allele for the specified marker and sample
or return -1 if the allele is missing.
|
int |
allele2(int marker,
int sample) |
Returns the second allele for the specified marker and sample
or return -1 if the allele is missing.
|
static int |
genotype(int a1,
int a2) |
Returns the genotype index corresponding to the
specified unordered alleles.
|
float |
gl(int marker,
int sample,
int allele1,
int allele2) |
Returns the probability of the observed data for the specified marker
and sample if the specified pair of ordered alleles is the true
ordered genotype.
|
boolean |
isGTData() |
Returns
true if the value returned by this.gl() is
determined by a called or missing genotype, and returns false
otherwise. |
boolean |
isPhased() |
Returns
true if the genotype for each marker and sample
is a phased, non-missing genotype, and returns false otherwise. |
boolean |
isPhased(int sample) |
Returns
true if the genotype for each marker for the
specified sample is a phased, nonmissing genotype, and returns
false otherwise. |
boolean |
isPhased(int marker,
int sample) |
Returns
true if the genotype for the specified marker
and sample is a phased, nonmissing genotype, and returns false
otherwise. |
Marker |
marker(int markerIndex) |
Returns the specified marker.
|
Markers |
markers() |
Returns the list of markers.
|
int |
nHaps() |
Returns the number of haplotypes.
|
int |
nMarkers() |
Returns the number of markers.
|
int |
nSamples() |
Returns the number of samples.
|
Samples |
samples() |
Returns the list of samples.
|
java.lang.String |
toString() |
public BasicGT(Samples samples, GTRec[] vma)
BasicGT instance.samples - the list of samples with genotype datavma - genotype emission probabilitiesjava.lang.IllegalArgumentException - if elements of vma corresponding to the same chromosome
are not contiguous and sorted in chromosome position orderjava.lang.IllegalArgumentException - if any
two vma elements correspond to the same genetic markerjava.lang.IllegalArgumentException - if
vma[j].samples().equals(samples) == false for any j
satisfying 0 <= j && j < vma.lengthjava.lang.NullPointerException - if samples == nulljava.lang.NullPointerException - if vma == nulljava.lang.NullPointerException - if vma[j] == null any j
satisfying 0 <= j && j < vma.lengthpublic static int genotype(int a1,
int a2)
a1 - the first allele index of an unordered genotypea2 - the second allele index of an unordered genotypejava.lang.IllegalArgumentException - if a1 < 0 || a2 < 0public boolean isPhased()
GTtrue if the genotype for each marker and sample
is a phased, non-missing genotype, and returns false otherwise.public boolean isGTData()
GTtrue if the value returned by this.gl() is
determined by a called or missing genotype, and returns false
otherwise.public boolean isPhased(int sample)
GTtrue if the genotype for each marker for the
specified sample is a phased, nonmissing genotype, and returns
false otherwise.public float gl(int marker,
int sample,
int allele1,
int allele2)
GTgl in interface GTmarker - the marker indexsample - the sample indexallele1 - the first allele indexallele2 - the second allele indexpublic boolean isPhased(int marker,
int sample)
GTtrue if the genotype for the specified marker
and sample is a phased, nonmissing genotype, and returns false
otherwise.public int allele1(int marker,
int sample)
GTthis.unphased(marker, sample) == false.public int allele2(int marker,
int sample)
GTthis.unphased(marker, sample) == false.public int allele(int marker,
int hap)
GTthis.unphased(marker, hap/2) == false.public int nMarkers()
GTpublic Marker marker(int markerIndex)
GTpublic int nHaps()
GT2*this.nSamples().public int nSamples()
GTpublic java.lang.String toString()
toString in class java.lang.Object