Package phase
Class ParamEstimates
- java.lang.Object
-
- phase.ParamEstimates
-
public class ParamEstimates extends java.lang.Object
Class
ParamEstimates
estimates the allele mismatch probability and the recombination intensity for a haploid Li and Stephens hidden Markov model.Instances of class
ParamEstimates
are thread-safe.
-
-
Constructor Summary
Constructors Constructor Description ParamEstimates()
Constructs a newParamEstimates
instance for the specified data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMismatchData(int markerCnt, double pMismatchSum)
Records the specified allele mismatch data ifmarkerCnt
andpMismatchSum
are finite positive values.void
addSwitchData(double genDistances, double switchProbs)
Records the specified genetic distance and switch probability ifgenDistances
andswitchProbs
are finite positive values.void
clear()
Clears all data that has been added via thethis.addMismatchData
andthis.addSwitchData()
methods.float
pMismatch()
Returns the estimated allele mismatch rate.float
recombIntensity()
Returns the estimated recombination intensities.
-
-
-
Method Detail
-
addMismatchData
public void addMismatchData(int markerCnt, double pMismatchSum)
Records the specified allele mismatch data ifmarkerCnt
andpMismatchSum
are finite positive values.- Parameters:
markerCnt
- the number of markers with mismatch datapMismatchSum
- the sum of estimated allele mismatch probabilities
-
addSwitchData
public void addSwitchData(double genDistances, double switchProbs)
Records the specified genetic distance and switch probability ifgenDistances
andswitchProbs
are finite positive values.- Parameters:
genDistances
- the list of genetic distanceswitchProbs
- the list of haplotype switch probabilities
-
pMismatch
public float pMismatch()
Returns the estimated allele mismatch rate. ReturnsFloat.NaN
if there is no data to estimate the allele mismatch rate. The returned value is not an atomic snapshot. Invocation in the absence of concurrent update will return an accurate result, but concurrent updates that occur white the sum is being calculated might not be incorporated in the returned result.- Returns:
- the estimated allele mismatch rate
-
recombIntensity
public float recombIntensity()
Returns the estimated recombination intensities. ReturnsFloat.NaN
if there is no data from which to estimate recombination intensities. The returned value is NOT an atomic snapshot. An accurate result is guaranteed only if no concurrent updates occur during method invocation.- Returns:
- the estimated recombination intensities
-
clear
public void clear()
Clears all data that has been added via thethis.addMismatchData
andthis.addSwitchData()
methods.
-
-