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.
| Constructor | Description |
|---|---|
ImpStates(ImpIbs ibsHaps) |
Constructs a new
ImpStates object from the specified data. |
| Modifier and Type | Method | Description |
|---|---|---|
int |
ibsStates(int targHap,
int[][] hapIndices,
boolean[][] alMatch) |
Stores the reference haplotype for the
j-th state
at the m-th marker in hapIndices[m][j], and stores
the equality of the allele carried by the reference haplotype for
the j-th state and the allele carried by the target haplotype
at the m-th marker in alMatch[m][j]. |
int |
nStates() |
Returns the number of HMM states per marker.
|
public ImpStates(ImpIbs ibsHaps)
ImpStates object from the specified data.ibsHaps - the IBS haplotype segmentsjava.lang.NullPointerException - if
impData == null || ibsStates == nullpublic int nStates()
public int ibsStates(int targHap,
int[][] hapIndices,
boolean[][] alMatch)
j-th state
at the m-th marker in hapIndices[m][j], and stores
the equality of the allele carried by the reference haplotype for
the j-th state and the allele carried by the target haplotype
at the m-th marker in alMatch[m][j]. The number of
HMM states states at each marker is returned.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 storedjava.lang.IndexOutOfBoundsException - if
targHap < 0 || targHap >= this.nTargHaps()java.lang.IndexOutOfBoundsException - if
(hapIndices.length < this.impData().nClusters()) or if any
hapIndices[j].length is less than the number of HMM states
at a marker for any j satisfying
(0 <= j && j < this.nClusters())java.lang.IndexOutOfBoundsException - if
(alMatch.length < this.impdata().nClusters()) or if any
alMatch[j].length is less than the number of HMM states
at a marker for any j satisfying
(0 <= j && j < this.nClusters())java.lang.NullPointerException - if
(hapIndices == null) or if (hapIndices[j] == null) for
any j satisfying (0 <= j && j < this.nClusters())java.lang.NullPointerException - if
(alMatch == null) or if (alMatch[j] == null) for
any j satisfying (0 <= j && j < this.nClusters())