Package imp
Class ImpStates
- java.lang.Object
-
- imp.ImpStates
-
public final class ImpStates extends java.lang.Object
Class
ImpStates
identifies a list of pseudo-reference haplotypes for a target haplotype. Each pseudo-reference haplotype is a one-dimensional mosaic of reference haplotype segments.Instances of
ImpStates
are not thread-safe.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
ibsStates(int targHap, int[][] hapIndices, boolean[][] alMatch)
Stores the reference haplotype for thej
-th state at them
-th marker inhapIndices[m][j]
, and stores the equality of the allele carried by the reference haplotype for thej
-th state and the allele carried by the target haplotype at them
-th marker inalMatch[m][j]
.int
nStates()
Returns the number of HMM states per marker.
-
-
-
Constructor Detail
-
ImpStates
public ImpStates(ImpIbs ibsHaps)
Constructs a newImpStates
object from the specified data.- Parameters:
ibsHaps
- the IBS haplotype segments- Throws:
java.lang.NullPointerException
- ifimpData == null || ibsStates == null
-
-
Method Detail
-
nStates
public int nStates()
Returns the number of HMM states per marker.- Returns:
- the number of HMM states per marker
-
ibsStates
public int ibsStates(int targHap, int[][] hapIndices, boolean[][] alMatch)
Stores the reference haplotype for thej
-th state at them
-th marker inhapIndices[m][j]
, and stores the equality of the allele carried by the reference haplotype for thej
-th state and the allele carried by the target haplotype at them
-th marker inalMatch[m][j]
. The number of HMM states states at each marker is returned.- Parameters:
targHap
- the haplotype indexhapIndices
- the two-dimensional array in which reference haplotype indices for each HMM state will be storedalMatch
- the two-dimensional array in which allele match status between the target haplotype and HMM state will be stored- Returns:
- the number of HMM states at each marker
- Throws:
java.lang.IndexOutOfBoundsException
- iftargHap < 0 || targHap >= this.nTargHaps()
java.lang.IndexOutOfBoundsException
- if(hapIndices.length < this.impData().nClusters())
or if anyhapIndices[j].length
is less than the number of HMM states at a marker for anyj
satisfying(0 <= j && j < this.nClusters())
java.lang.IndexOutOfBoundsException
- if(alMatch.length < this.impdata().nClusters())
or if anyalMatch[j].length
is less than the number of HMM states at a marker for anyj
satisfying(0 <= j && j < this.nClusters())
java.lang.NullPointerException
- if(hapIndices == null)
or if(hapIndices[j] == null)
for anyj
satisfying(0 <= j && j < this.nClusters())
java.lang.NullPointerException
- if(alMatch == null)
or if(alMatch[j] == null)
for anyj
satisfying(0 <= j && j < this.nClusters())
-
-