GTpublic final class SplicedGT extends java.lang.Object implements GT
Class SplicedGT represents genotype emission probabilities
for a set of samples. The genotype emission probabilities are determined
by a RefGTWindow instance for the initial markers, and are
determined by a GT instance for the remaining markers.
The isPhased() and isPhased(sample) methods of the
SplicedGT class return the same values as the corresponding
methods of the GT instance.
Instances of class SplicedGT are immutable.
| Constructor | Description |
|---|---|
SplicedGT(GT phasedOverlap,
GT gt) |
Constructs a new
SplicedGL 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.
|
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 marker) |
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 SplicedGT(GT phasedOverlap, GT gt)
SplicedGL instance.phasedOverlap - sample haplotype pairs for the initial
markersgt - genotype emission probabilities for all markersjava.lang.IllegalArgumentException - if
phasedOverlaps.nMarkers() >= gt.nMarkers()java.lang.IllegalArgumentException - if
phasedOverlaps.marker(j).equals(gt.marker(j)) == false for any j
satisfying 0 <= j && j < phasedOverlaps.nMarkers()java.lang.IllegalArgumentException - if
phasedOverlaps.samples().equals(gt.samples()) == falsejava.lang.IllegalArgumentException - if
phasedOverlap.isPhased() == falsejava.lang.NullPointerException - if phasedOverlap == null || gt == nullpublic 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 Marker marker(int marker)
GTpublic int nMarkers()
GTpublic int nHaps()
GT2*this.nSamples().public int nSamples()
GTpublic java.lang.String toString()
toString in class java.lang.Object