Package phase
Class HmmParamData
- java.lang.Object
-
- phase.HmmParamData
-
public class HmmParamData extends java.lang.Object
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
Constructors Constructor Description HmmParamData(PbwtPhaseIbs phaseIbs)
Creates aHmmParamData
instance for the specified data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEstimationData(ParamEstimates paramEst)
Adds the generated data for estimating allele mismatch and recombination intensity parameters to the specified object.int
nTargSamples()
Returns the number of target samples.double
sumSwitchProbs()
Returns the sum of the probabilities of switching reference haplotypes between consecutive markers obtained from the generated data.void
update(int sample)
Uses the specified sample to generate data for estimating the allele mismatch and recombination intensity HMM parameters.
-
-
-
Constructor Detail
-
HmmParamData
public HmmParamData(PbwtPhaseIbs phaseIbs)
Creates aHmmParamData
instance for the specified data.- Parameters:
phaseIbs
- the IBS haplotype segments- Throws:
java.lang.NullPointerException
- ifphaseIbs == null
-
-
Method Detail
-
nTargSamples
public int nTargSamples()
Returns the number of target samples.- Returns:
- the number of target samples
-
addEstimationData
public void addEstimationData(ParamEstimates paramEst)
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:
java.lang.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:
java.lang.IndexOutOfBoundsException
- ifsample < 0 || sample >= this.nTargSamples()
-
-