Package phase
Class ParamEstimates
- java.lang.Object
-
- phase.ParamEstimates
-
public class ParamEstimates extends java.lang.ObjectClass
ParamEstimatesestimates the allele mismatch probability and the recombination intensity for a haploid Li and Stephens hidden Markov model.Instances of class
ParamEstimatesare thread-safe.
-
-
Constructor Summary
Constructors Constructor Description ParamEstimates()Constructs a newParamEstimatesinstance for the specified data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMismatchData(int markerCnt, double pMismatchSum)Records the specified allele mismatch data ifmarkerCnt > 0voidaddSwitchData(double genDistances, double switchProbs)Records the specified genetic distance and switch probability ifgenDistances > 0.voidclear()Clears all data that has been added via thethis.addMismatchDataandthis.addSwitchData()methods.floatpMismatch()Returns the estimated allele mismatch rate.floatrecombIntensity()Returns the estimated recombination intensities.
-
-
-
Method Detail
-
addMismatchData
public void addMismatchData(int markerCnt, double pMismatchSum)Records the specified allele mismatch data ifmarkerCnt > 0- 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 > 0.- Parameters:
genDistances- the list of genetic distanceswitchProbs- the list of haplotype switch probabilities
-
pMismatch
public float pMismatch()
Returns the estimated allele mismatch rate. Returns 0 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
-
clear
public void clear()
Clears all data that has been added via thethis.addMismatchDataandthis.addSwitchData()methods.
-
recombIntensity
public float recombIntensity()
Returns the estimated recombination intensities. Returns0fif 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
-
-