public class ImpData
extends java.lang.Object
Class ImpData
contains the input data for imputation of
ungenotyped markers.
Instances of class ImpData
are immutable.
Constructor | Description |
---|---|
ImpData(Par par,
CurrentData cd,
GT phasedTarg,
GeneticMap map) |
Constructs a new
ImpData instance from the specified data. |
Modifier and Type | Method | Description |
---|---|---|
int |
allele(int cluster,
int hap) |
Returns the specified target marker cluter alleles for the
reference and target haplotypes.
|
CurrentData |
cd() |
Returns the current data.
|
float |
errProb(int cluster) |
Returns the probability that the allele carried by the specified
target marker cluster matches the allele labeling the latent HMM state.
|
IndexArray |
hapToSeq(int cluster) |
Returns the specified target marker cluster alleles for the
reference and target haplotypes.
|
int |
nClusters() |
Return the number of target marker clusters.
|
int |
nHaps() |
Return the total number of reference and target haplotypes.
|
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
|
double[] |
pos() |
Return an array of size
this.nClusters() containing the
the genetic map positions of the target marker clusters. |
double |
pos(int cluster) |
Return the genetic map position of the specified target marker cluster.
|
float |
pRecomb(int cluster) |
Return the probability of recombination between the specified
target marker cluster and the previous target marker cluster.
|
int |
refClusterEnd(int cluster) |
Returns the index of the reference marker corresponding to the end
(exclusive) of the specified target marker cluster.
|
int |
refClusterStart(int cluster) |
Returns the index of the reference marker corresponding to the start
(inclusive) of the specified target marker cluster.
|
RefGT |
refGT() |
Return the reference genotype data
|
int |
targClusterEnd(int cluster) |
Returns the target marker index corresponding to the end (exclusive) of
the specified marker cluster.
|
int |
targClusterStart(int cluster) |
Returns the target marker index corresponding to the start (inclusive)
of the specified marker cluster.
|
GT |
targGT() |
Return the phased target genotype data.
|
Samples |
targSamples() |
Returns the list of target samples.
|
double |
weight(int refMarker) |
Return the weight for the HMM state probability at the
preceding target marker cluster when estimating the HMM state
probability at the specified reference marker via linear interpolation
of HMM state probabilities at the preceding and succeeding target
marker clusters.
|
public ImpData(Par par, CurrentData cd, GT phasedTarg, GeneticMap map)
ImpData
instance from the specified data.par
- the analysis parameterscd
- the input data for the current marker windowphasedTarg
- the phased target genotypesmap
- the genetic mapjava.lang.IllegalArgumentException
- if
cd.targMarkers().equals(phasedTarg.markers() == false
java.lang.IllegalArgumentException
- if
cd.targSamples().equals(phasedTarg.samples()) == false
java.lang.IllegalArgumentException
- if
phasedTarg.isPhased() == false
java.lang.NullPointerException
- if any parameter is null
public Par par()
public CurrentData cd()
public RefGT refGT()
public GT targGT()
isPhased()
method
of the returned object returns true
.public int targClusterStart(int cluster)
cluster
- index of a target marker clusterjava.lang.IndexOutOfBoundsException
- if
cluster < 0 || cluster >= this.nClusters()
public int targClusterEnd(int cluster)
cluster
- index of a target marker clusterjava.lang.IndexOutOfBoundsException
- if
cluster < 0 || cluster >= this.nClusters()
public int refClusterStart(int cluster)
cluster
- index of a target marker clusterjava.lang.IndexOutOfBoundsException
- if
cluster < 0 || cluster >= this.nClusters()
public int refClusterEnd(int cluster)
cluster
- index of a target marker clusterjava.lang.IndexOutOfBoundsException
- if
cluster < 0 || cluster >= this.nClusters()
public int nClusters()
public Samples targSamples()
public int nTargSamples()
public int nHaps()
public int nRefHaps()
public int nTargHaps()
public int allele(int cluster, int hap)
(this.nRefHaps() <= hap && hap < this.nHaps())
then
(this.allele(marker, hap) ==
this.targAllele(marker, hap - this.nRefHaps())
cluster
- index of a target marker clusterhap
- a haplotype indexjava.lang.IndexOutOfBoundsException
- if
cluster < 0 || cluster >= this.nClusters()
java.lang.IndexOutOfBoundsException
- if
haplotype < 0 || haplotype >= this.nHaps()
public IndexArray hapToSeq(int cluster)
(this.hapToSeq(cluster).get(hap)==this.allele(cluster, hap))
for any cluster
and hap
satisfying
(0 <= cluster && cluster < this.nClusters())
and
(0 <= hap && hap < this.nHaps())
cluster
- index of a target marker clusterjava.lang.IndexOutOfBoundsException
- if
cluster < 0 || cluster >= this.nClusters()
public float errProb(int cluster)
cluster
- index of a target marker clusterjava.lang.IndexOutOfBoundsException
- if
cluster < 0 || cluster >= this.nClusters()
public double pos(int cluster)
cluster
- index of a target marker clusterjava.lang.IllegalArgumentException
- if
cluster < 0 || marker >= this.nClusters()
public double[] pos()
this.nClusters()
containing the
the genetic map positions of the target marker clusters.public float pRecomb(int cluster)
0
if (cluster == 0)
.cluster
- index of a target marker clusterjava.lang.IllegalArgumentException
- if
cluster < 0 || cluster >= this.nClusters()
public double weight(int refMarker)
refMarker
- a reference marker indexjava.lang.IllegalArgumentException
- if
refMarker < 0 || refMarker >= this.refGT().nMarkers()