Package phase
Class ParamEstimates
java.lang.Object
phase.ParamEstimates
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
ConstructorsConstructorDescriptionConstructs a newParamEstimatesinstance for the specified data. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMismatchData(int markerCnt, double pMismatchSum) Records the specified allele mismatch data ifmarkerCntandpMismatchSumare finite positive values.voidaddSwitchData(double genDistances, double switchProbs) Records the specified genetic distance and switch probability ifgenDistancesandswitchProbsare finite positive values.voidclear()Clears all data that has been added via thethis.addMismatchDataandthis.addSwitchData()methods.floatReturns the estimated allele mismatch rate.floatReturns the estimated recombination intensities.
-
Constructor Details
-
ParamEstimates
public ParamEstimates()Constructs a newParamEstimatesinstance for the specified data.
-
-
Method Details
-
addMismatchData
public void addMismatchData(int markerCnt, double pMismatchSum) Records the specified allele mismatch data ifmarkerCntandpMismatchSumare 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 ifgenDistancesandswitchProbsare 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.NaNif 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.NaNif 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.addMismatchDataandthis.addSwitchData()methods.
-