public class PhaseData
extends java.lang.Object
Class PhaseData
contains the input data for phasing
genotypes.
Instances of class PhaseData
are immutable.
Constructor | Description |
---|---|
PhaseData(CurrentData cd,
EstPhase estPhase,
double recombFactor,
int it,
long seed) |
Constructs a new
ImpData instance from the specified data. |
Modifier and Type | Method | Description |
---|---|---|
int |
allele(int marker,
int hap) |
|
boolean |
burnin() |
Returns
true if the current phasing iteration is a burnin
iteration and returns false otherwise. |
FloatArray |
genDist() |
Return a
FloatArray of size this.nTargMarkers()
whose k -th element is the genetic distance between the
k -th target marker and the previous marker, or 0.0
if (k == 0) . |
int |
iter() |
Returns the iteration index.
|
Marker |
marker(int marker) |
Returns the specified marker.
|
Markers |
markers() |
Returns the list of target markers.
|
int |
nHaps() |
Returns the number of reference and target haplotypes.
|
int |
nItsRemaining() |
Returns the number of iterations remaining.
|
int |
nMarkers() |
Returns the number of target markers
|
int |
nRefHaps() |
Return the number of reference haplotypes.
|
int |
nTargHaps() |
Return the number of target haplotypes.
|
int |
nTargSamples() |
Returns the number of target samples.
|
Par |
par() |
Returns the command line parameters
|
float |
pErr(int marker) |
Returns the probability that the allele carried by the specified
target marker cluster matches the allele labeling the latent HMM state.
|
double[] |
pos() |
Returns the array of genetic map positions whose
k -th element
equals this.pos(k) . |
FloatArray |
pRecomb() |
Return a
FloatArray of size this.nTargMarkers()
whose k -th element is the factor multiplied by genetic distance
to obtain the probability of transitioning to a random HMM state
between the k -th target marker and the previous marker. |
long |
seed() |
Returns the seed for generating random numbers.
|
public PhaseData(CurrentData cd, EstPhase estPhase, double recombFactor, int it, long seed)
ImpData
instance from the specified data.cd
- the input data for the current marker windowestPhase
- the current estimate of phased target genotypesrecombFactor
- the factor multiplied by genetic distance to
obtain the probability of transitioning to a random HMM state.it
- the current iteration (first iteration has index 0)seed
- seed for random numbersjava.lang.IllegalArgumentException
- if
cd.targMarkers().equals(estPhase.markers() == false
java.lang.IllegalArgumentException
- if
recombFactor < 0 || Double.isFinite(recombFactor)==false
java.lang.IllegalArgumentException
- if
cd.targSamples().equals(estPhase.samples()) == false
java.lang.NullPointerException
- if any parameter is null
public Par par()
public boolean burnin()
true
if the current phasing iteration is a burnin
iteration and returns false
otherwise.true
if the current phasing iteration is a burnin
iterationpublic int allele(int marker, int hap)
public int iter()
public int nItsRemaining()
public int nMarkers()
public Markers markers()
public Marker marker(int marker)
marker
- a marker indexjava.lang.IndexOutOfBoundsException
- if
marker < 0 || marker >= this.nMarkers()
public int nTargSamples()
public int nRefHaps()
public int nTargHaps()
public int nHaps()
public float pErr(int marker)
marker
- index of a target marker clusterjava.lang.IndexOutOfBoundsException
- if
cluster < 0 || cluster >= this.nClusters()
public double[] pos()
k
-th element
equals this.pos(k)
.public FloatArray genDist()
FloatArray
of size this.nTargMarkers()
whose k
-th element is the genetic distance between the
k
-th target marker and the previous marker, or 0.0
if (k == 0)
.FloatArray
of size this.nTargMarkers()
whose k
-th element is the genetic distance between the
k
-th target marker and the previous marker,public FloatArray pRecomb()
FloatArray
of size this.nTargMarkers()
whose k
-th element is the factor multiplied by genetic distance
to obtain the probability of transitioning to a random HMM state
between the k
-th target marker and the previous marker.FloatArray
of size this.nTargMarkers()
whose k
-th element is the factor multiplied by genetic distance
to obtain the probability of transitioning to a random HMM state
between the k
-th target marker and the previous markerpublic long seed()