Package imp
Class ImpIbs
- java.lang.Object
-
- imp.ImpIbs
-
public final class ImpIbs extends java.lang.Object
Class
ImpIbs
identifies haplotypes that share a long IBS segment with a specified haplotype.Instances of
ImpIbs
are immutable.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int[]
ibsHaps(int hap, int step)
Returns an array containing reference haplotype indices that that are IBS with the specified target haplotype in an interval beginning with the specified step.ImpData
impData()
Return the data for genotype imputation in the marker window.int
nStates()
Returns the number of HMM states per marker.int
nSteps()
Returns the number of IBS steps in the marker window.int
stepStart(int step)
Returns the index of the first marker in the specified step.
-
-
-
Constructor Detail
-
ImpIbs
public ImpIbs(ImpData impData)
Constructs a newImpIbs
object from the specified data.- Parameters:
impData
- the input data for genotype imputation- Throws:
java.lang.NullPointerException
- ifimpData == null
-
-
Method Detail
-
ibsHaps
public int[] ibsHaps(int hap, int step)
Returns an array containing reference haplotype indices that that are IBS with the specified target haplotype in an interval beginning with the specified step. The returned array will contain fewer thanthis.nHapsPerStep()
haplotypes if the number of reference haplotypes that are IBS with specified target haplotype in the specified step is less thanthis.nHapsPerStep()
.- Parameters:
hap
- a haplotype indexstep
- a step index- Returns:
- an array containing reference haplotype indices that that are IBS with the specified target haplotype
- Throws:
java.lang.IndexOutOfBoundsException
- ifhap < 0 || hap >= this.hapPairs().nHaps()
java.lang.IndexOutOfBoundsException
- ifstep < 0 || step >= this.nSteps()
-
impData
public ImpData impData()
Return the data for genotype imputation in the marker window.- Returns:
- the data for genotype imputation in the marker window
-
nStates
public int nStates()
Returns the number of HMM states per marker.- Returns:
- the number of HMM states per marker
-
nSteps
public int nSteps()
Returns the number of IBS steps in the marker window.- Returns:
- the number of IBS steps in the marker window
-
stepStart
public int stepStart(int step)
Returns the index of the first marker in the specified step.- Parameters:
step
- a step index- Returns:
- the index of the first marker in the specified step
- Throws:
java.lang.IllegalArgumentException
- ifstep < 0 || step >= this.nSteps()
-
-