RefGTBasicGT, BasicRefGT, EstPhase.HapsGT, HapPairPhasedGT, SplicedGT, XBasicGTpublic interface GT
Interface GT represents genotype data
for a list of markers and a list of samples.
All instances of GT are required to be immutable.
| 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.
|
default 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.
|
default 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.
|
default 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.
|
int nMarkers()
Markers markers()
Marker marker(int marker)
marker - a marker indexjava.lang.IndexOutOfBoundsException - if
marker < 0 || marker >= this.nMarkers()default int nHaps()
2*this.nSamples().int nSamples()
Samples samples()
int allele1(int marker,
int sample)
this.unphased(marker, sample) == false.marker - the marker indexsample - the sample indexjava.lang.IndexOutOfBoundsException - if
marker < 0 || marker >= this.nMarkers()java.lang.IndexOutOfBoundsException - if
sample < 0 || sample >= this.nSamples()int allele2(int marker,
int sample)
this.unphased(marker, sample) == false.marker - the marker indexsample - the sample indexjava.lang.IndexOutOfBoundsException - if
marker < 0 || marker >= this.nMarkers()java.lang.IndexOutOfBoundsException - if
sample < 0 || sample >= this.nSamples()int allele(int marker,
int hap)
this.unphased(marker, hap/2) == false.marker - the marker indexhap - the haplotype indexjava.lang.IndexOutOfBoundsException - if
marker < 0 || marker >= this.nMarkers()java.lang.IndexOutOfBoundsException - if
hap < 0 || hap >= this.nHaps()boolean isPhased(int marker,
int sample)
true if the genotype for the specified marker
and sample is a phased, nonmissing genotype, and returns false
otherwise.marker - the marker indexsample - the sample indextrue if the genotype for the specified marker
and sample is a phased, nonmissing genotypejava.lang.IndexOutOfBoundsException - if
marker < 0 || marker >= this.nMarkers()java.lang.IndexOutOfBoundsException - if
sample < 0 || sample >= this.nSamples()boolean isPhased(int sample)
true if the genotype for each marker for the
specified sample is a phased, nonmissing genotype, and returns
false otherwise.sample - a sample indextrue if the genotype for each marker for the
specified sample is a phased, nonmissing genotypejava.lang.IndexOutOfBoundsException - if
sample < 0 || sample >= this.nSamples()boolean isPhased()
true if the genotype for each marker and sample
is a phased, non-missing genotype, and returns false otherwise.true if the genotype for each marker and sample
is a phased, non-missing genotypedefault boolean isGTData()
true if the value returned by this.gl() is
determined by a called or missing genotype, and returns false
otherwise.true if the value returned by this.gl() is
determined by a called or missing genotypedefault float gl(int marker,
int sample,
int allele1,
int allele2)
marker - the marker indexsample - the sample indexallele1 - the first allele indexallele2 - the second allele indexjava.lang.IndexOutOfBoundsException - if
marker < 0 || marker >= this.nMarkers()java.lang.IndexOutOfBoundsException - if
samples < 0 || samples >= this.nSamples()java.lang.IndexOutOfBoundsException - if
allele1 < 0 || allele1 >= this.marker(marker).nAlleles()java.lang.IndexOutOfBoundsException - if
allele2 < 0 || allele2 >= this.marker(marker).nAlleles()