Package imp
Class ImpStates
java.lang.Object
imp.ImpStates
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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintibsStates(int targHap, int[][] haps, 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].intReturns the maximum number of HMM states at a marker.
-
Constructor Details
-
ImpStates
Constructs a newImpStatesobject from the specified data.- Parameters:
ibsHaps- the IBS haplotype segments- Throws:
NullPointerException- ifibsHaps == null
-
-
Method Details
-
maxStates
public int maxStates()Returns the maximum number of HMM states at a marker.- Returns:
- the maximum number of HMM states at a marker
-
ibsStates
public int ibsStates(int targHap, int[][] haps, 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 indexhaps- 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:
IndexOutOfBoundsException- iftargHap < 0 || targHap >= this.impData().nTargHaps()IndexOutOfBoundsException- if either two-dimensional array is not large enough to contain the rectangular array of HMM statesNullPointerException- if any array isnull
-