Constructor | Description |
---|---|
XBasicGT(GT gl,
Pedigree ped) |
Constructs a
XBasicGT instance from the specified data. |
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 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 XBasicGT(GT gl, Pedigree ped)
XBasicGT
instance from the specified data.gl
- the genotype likelihoodsped
- the pedigreesjava.lang.IllegalArgumentException
- if
gl.samples().equals(ped.samples())==false
java.lang.NullPointerException
- if gl == null || ped == null
public boolean isPhased()
GT
true
if the genotype for each marker and sample
is a phased, non-missing genotype, and returns false
otherwise.public boolean isGTData()
GT
true
if the value returned by this.gl()
is
determined by a called or missing genotype, and returns false
otherwise.public boolean isPhased(int sample)
GT
true
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)
GT
gl
in interface GT
marker
- the marker indexsample
- the sample indexallele1
- the first allele indexallele2
- the second allele indexpublic boolean isPhased(int marker, int sample)
GT
true
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)
GT
this.unphased(marker, sample) == false
.public int allele2(int marker, int sample)
GT
this.unphased(marker, sample) == false
.public int allele(int marker, int hap)
GT
this.unphased(marker, hap/2) == false
.public int nMarkers()
GT
public Marker marker(int markerIndex)
GT
public int nHaps()
GT
2*this.nSamples()
.public int nSamples()
GT
public java.lang.String toString()
toString
in class java.lang.Object