public final class PhaseIbs
extends java.lang.Object
Class PhaseIbs
identifies haplotypes that share a long
IBS segment with a specified haplotype.
Instances of PhaseIbs
are immutable.
Constructor | Description |
---|---|
PhaseIbs(PhaseData phaseData) |
Constructs a new
PhaseIbs object from the specified data. |
Modifier and Type | Method | Description |
---|---|---|
IntSet |
ibsHaps(int h1,
int h2,
int step) |
Returns a set containing the specified number of haplotype
indices that are IBS with haplotype
h1 in the specified
step. |
int |
nStates() |
Returns the number of HMM states per marker.
|
int |
nSteps() |
Returns the number of IBS steps in the marker window.
|
PhaseData |
phaseData() |
Return the data used to phase genotypes in a marker window.
|
int |
stepStart(int step) |
Returns the first marker index in the specified step.
|
public PhaseIbs(PhaseData phaseData)
PhaseIbs
object from the specified data.phaseData
- the input data for an iteration of genotype phasingjava.lang.IllegalArgumentException
- if
hapPairs.markers().equals(map.markers()) == false
java.lang.IllegalArgumentException
- if
stepLength <= 0.0 || nStepsToMerge < 1 || nStates < 1
java.lang.NullPointerException
- if hapPairs == null || map == null
public IntSet ibsHaps(int h1, int h2, int step)
h1
in the specified
step. The returned set is guaranteed to not contain indices
h1
or h2
. The returned set will contain fewer than
this.nHapsPerStep()
haplotypes if the number of haplotypes
that are IBS with haplotype h1
is less than
this.nHapsPerStep()
.h1
- a haplotype indexh2
- a haplotype indexstep
- a step indexjava.lang.IndexOutOfBoundsException
- if
h1 < 0 || h1 >= this.hapPairs().nHaps()
java.lang.IndexOutOfBoundsException
- if
h2 < 0 || h2 >= this.hapPairs().nHaps()
java.lang.IndexOutOfBoundsException
- if
step < 0 || step >= this.nSteps()
java.lang.IllegalArgumentException
- if
nHaps < 0 || nHaps > (1 << 30)
public PhaseData phaseData()
public int nStates()
public int nSteps()
public int stepStart(int step)
step
- a step indexjava.lang.IllegalArgumentException
- if
step < 0 || step >= this.nSteps()