public final class PhaseStates
extends java.lang.Object
Class PhaseStates
identifies a rolling window of reference
haplotypes for a target sample.
Instances of PhaseStates
are not thread-safe.
Constructor | Description |
---|---|
PhaseStates(PhaseIbs ibsHaps) |
Constructs a new
PhaseIbs object from the specified data. |
Modifier and Type | Method | Description |
---|---|---|
int |
ibsStates(int sample,
int[][] stateAlleles) |
Identifies the HMM state alleles for the specified sample.
|
int |
nStates() |
Returns the number of HMM states per marker.
|
public PhaseStates(PhaseIbs ibsHaps)
PhaseIbs
object from the specified data.ibsHaps
- IBS haplotype segmentsjava.lang.IllegalArgumentException
- if nHapsPerStep < 1
java.lang.NullPointerException
- if ibsStates == null
public int nStates()
public int ibsStates(int sample, int[][] stateAlleles)
j
-th state allele for the m
-th marker will be
stored in stateAlleles[m][j]
.sample
- the sample indexstateAlleles
- the two-dimensional array in which
state alleles will be storedjava.lang.IndexOutOfBoundsException
- if
sample < 0 || sample >= this.hapPairs().nSamples()
java.lang.IndexOutOfBoundsException
- if
stateAlleles.length < this.hapPairs().nMarkers()
or if
stateAlleles[j].length < this.nStates()
for any
j
satisfying (0 <= j && j < this.hapPairs().nMarkers())
java.lang.NullPointerException
- if
stateAlleles == null
or if stateAlleles[j] == null
for
any j
satisfying
(0 <= j && j < this.hapPairs().nMarkers())