Package phase
Class RecombRegress
- java.lang.Object
-
- phase.RecombRegress
-
public class RecombRegress extends java.lang.Object
Class
RecombRegress
uses linear regression to estimate the recombination factor for a haploid Li and Stephens hidden Markov model.Instances of class
RecombRegress
are not thread-safe.
-
-
Constructor Summary
Constructors Constructor Description RecombRegress(PhaseIbs phaseIbs, Regress regress)
Creates aRecombRegress
instance for the specified data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PhaseData
phaseData()
Returns the current input data for genotype phasing.double
sumY()
Returns the sum of the probabilities of switching reference haplotypes between consecutive markers stored bythis.update()
.void
update(int sample)
Stores regression data for regressing the probability of switching reference haplotypes between consecutive markers on genetic distance for the specified sample.
-
-
-
Constructor Detail
-
RecombRegress
public RecombRegress(PhaseIbs phaseIbs, Regress regress)
Creates aRecombRegress
instance for the specified data.- Parameters:
phaseIbs
- the IBS haplotype segmentsregress
- the object for storing data for regressing the probability of switching reference haplotypes between consecutive markers on genetic distance- Throws:
java.lang.NullPointerException
- if(phaseIBS == null || regress == null)
-
-
Method Detail
-
phaseData
public PhaseData phaseData()
Returns the current input data for genotype phasing.- Returns:
- the current input data for genotype phasing
-
update
public void update(int sample)
Stores regression data for regressing the probability of switching reference haplotypes between consecutive markers on genetic distance for the specified sample.- Parameters:
sample
- a sample index- Throws:
java.lang.IndexOutOfBoundsException
- ifsample < 0 || sample >= phaseData().targGT().nSamples()
-
sumY
public double sumY()
Returns the sum of the probabilities of switching reference haplotypes between consecutive markers stored bythis.update()
.- Returns:
- the sum of the probabilities of switching reference haplotypes between consecutive markers
-
-