Package phase
Class HmmParamData
java.lang.Object
phase.HmmParamData
Class HmmParamData generates data for estimating
allele mismatch and recombination intensity parameters for a
haploid Li and Stephens hidden Markov model.
Instances of class HmmParamData are not thread-safe.
-
Constructor Summary
ConstructorsConstructorDescriptionHmmParamData(PbwtPhaseIbs phaseIbs) Creates aHmmParamDatainstance for the specified data. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEstimationData(ParamEstimates paramEst) Adds the generated data for estimating allele mismatch and recombination intensity parameters to the specified object.intReturns the number of target samples.doubleReturns the sum of the probabilities of switching reference haplotypes between consecutive markers obtained from the generated data.voidupdate(int sample) Uses the specified sample to generate data for estimating the allele mismatch and recombination intensity HMM parameters.
-
Constructor Details
-
HmmParamData
Creates aHmmParamDatainstance for the specified data.- Parameters:
phaseIbs- the IBS haplotype segments- Throws:
NullPointerException- ifphaseIbs == null
-
-
Method Details
-
nTargSamples
public int nTargSamples()Returns the number of target samples.- Returns:
- the number of target samples
-
addEstimationData
Adds the generated data for estimating allele mismatch and recombination intensity parameters to the specified object. The generated data is not cleared.- Parameters:
paramEst- the object that estimates model parameters- Throws:
NullPointerException- ifparamEst == null
-
sumSwitchProbs
public double sumSwitchProbs()Returns the sum of the probabilities of switching reference haplotypes between consecutive markers obtained from the generated data.- Returns:
- the sum of the probabilities of switching reference haplotypes between consecutive markers obtained from the generated data
-
update
public void update(int sample) Uses the specified sample to generate data for estimating the allele mismatch and recombination intensity HMM parameters.- Parameters:
sample- a sample index- Throws:
IndexOutOfBoundsException- ifsample < 0 || sample >= this.nTargSamples()
-