public class GprobsStatistics
extends java.lang.Object
Class GprobsStatistics
has methods for computing statistics
from posterior genotype probabilities.
The squared correlation statistics computed by this class can be derived using the methods found in Appendix 1 of "Browning BL and Browning SR, Am J Hum Genet 2009;84(2):210-23". If a variant has multiple ALT alleles, all ALT alleles are collapsed into a single allele when computing the squared correlation statistics.
Constructor and Description |
---|
GprobsStatistics(AlleleProbs alleleProbs,
int marker)
Constructs a new
GprobsStatistics instance from the
specified allele probabilities. |
GprobsStatistics(GenotypeValues gv,
int marker)
Constructs a new
GprobsStatistics instance from the
specified scaled genotype probabilities. |
Modifier and Type | Method and Description |
---|---|
double[] |
alleleFreq()
Returns an array of length
this.marker().nAlleles() whose
j -th element is the estimated sample frequency of allele
j . |
double |
allelicR2()
Returns the estimated squared correlation between the most probable
ALT allele dose and the true ALT allele dose.
|
double |
doseR2()
Returns the estimated squared correlation between the estimated
ALT allele dose and the true ALT allele dose.
|
double |
hweDoseR2()
Returns the estimated squared correlation between the estimated
ALT allele dose and the true ALT allele dose where the variance of
the true ALT allele dose is estimated from the estimated
ALT allele frequency.
|
Marker |
marker()
Returns the marker.
|
java.lang.String |
toString()
Returns a string representation of
this . |
public GprobsStatistics(GenotypeValues gv, int marker)
GprobsStatistics
instance from the
specified scaled genotype probabilities.gv
- scaled sample posterior genotype probabilitiesmarker
- a marker indexjava.lang.IndexOutOfBoundsException
- if
marker < 0 || marker >= gv.nMarkers()
java.lang.NullPointerException
- if gv == null
public GprobsStatistics(AlleleProbs alleleProbs, int marker)
GprobsStatistics
instance from the
specified allele probabilities.alleleProbs
- the allele probabilitiesmarker
- a marker indexjava.lang.IndexOutOfBoundsException
- if
marker < 0 || marker >= alProbs.nMarkers()
java.lang.NullPointerException
- if alProbs == null
public Marker marker()
public double[] alleleFreq()
this.marker().nAlleles()
whose
j
-th element is the estimated sample frequency of allele
j
.this.marker().nAlleles()
whose
j
-th element is the estimated sample frequency of allele
j
public double allelicR2()
public double doseR2()
public double hweDoseR2()
public java.lang.String toString()
this
. The exact
details of the representation are unspecified and subject to change.toString
in class java.lang.Object
this