public class CurrentData
extends java.lang.Object
Class CurrentData
represents input data for the current marker
window. All marker indices returned my methods of class CurrentData
are indexed with respect to the current marker window.
Instances of class CurrentData
are immutable.
Constructor | Description |
---|---|
CurrentData(Par par,
GeneticMap genMap,
Data data,
GT overlapHaps) |
Constructs a new
CurrentData instance from the specified
data. |
Modifier and Type | Method | Description |
---|---|---|
java.util.List<HapPair> |
addRestrictedRefHapPairs(java.util.List<BitHapPair> list) |
Returns a list with the specified haplotypes following by the
reference haplotype pairs that are restricted to the target data markers.
|
Samples |
allSamples() |
Returns a list of all target and reference samples.
|
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) . |
float |
intensity() |
Returns the intensity used to generate the pRecomb values.
|
MarkerMap |
map() |
Returns the genetic map.
|
int |
markerIndex(int targetMarker) |
Returns the index of the specified marker in the reference data markers.
|
int[] |
markerIndices() |
Returns an array of length
this.nTargMarkers() which maps
the k -th marker in the list of target data markers to the
index of the marker in the list of reference data markers. |
Markers |
markers() |
Returns the list of reference data markers.
|
int |
nAllSamples() |
Returns the number of reference and target samples.
|
int |
nextOverlapStart() |
Returns the first marker index in the overlap between this
marker window and the next marker window, or
returns
this.nMarkers() the next marker window is from
a different chromosome. |
int |
nextSpliceStart() |
Returns the first marker index after the splice point between this
marker window and the next marker window, or returns
this.nMarkers() if there is no overlap or if there are
no markers after the splice point. |
int |
nextTargetOverlapStart() |
Returns the first target marker index in the overlap between this
marker window and the next marker window, or
returns
this.nMarkers() if there is no overlap or if there are
no target markers in the overlap. |
int |
nextTargetSpliceStart() |
Returns the first target marker index after the splice point between this
marker window and the next marker window, or returns
this.nTargMarkers() if there is no overlap or if there are
no target markers after the splice point |
int |
nHaps() |
|
int |
nMarkers() |
Returns the number of reference data markers.
|
int |
nRefHaps() |
Returns the number of reference haplotypes.
|
int |
nRefSamples() |
Returns the number of reference samples.
|
int |
nTargetSamples() |
Returns the number of target samples.
|
int |
nTargHaps() |
Returns the number of target haplotypes.
|
int |
nTargMarkers() |
Returns the number of target data markers.
|
Par |
par() |
Return the analysis parameters.
|
Pedigree |
ped() |
Returns the parent-offspring relationships.
|
int |
prevSpliceStart() |
Returns the first marker index after the splice point with
the previous marker window.
|
int |
prevTargetSpliceStart() |
Returns the first target marker index after the splice point with
the previous marker window.
|
RefGT |
refGT() |
Returns the phased, nonmissing reference genotype data
or
null if there are no reference data. |
Samples |
refSamples() |
Returns the list of reference samples, or
null if
there are no reference samples. |
RefGT |
restrictRefGT() |
Returns the phased, nonmissing reference genotype data for
the target data markers or
null if there are no reference data. |
GT |
targGT() |
Returns the genotype likelihoods for the
target samples at the target data markers.
|
int |
targMarkerIndex(int marker) |
Returns the index of the specified marker in the target data, or
returns -1 if the marker is not present in the target data.
|
int[] |
targMarkerIndices() |
Returns an array of length
this.nMarkers() whose k -th
element is the index of the k -th marker in the list of target
markers or is -1 if the marker is not present in the target data. |
Markers |
targMarkers() |
Returns the list of target data markers.
|
Samples |
targSamples() |
Returns the list of target samples.
|
int |
window() |
Returns the marker window index.
|
public CurrentData(Par par, GeneticMap genMap, Data data, GT overlapHaps)
CurrentData
instance from the specified
data.par
- the analysis parametersgenMap
- the genetic map or null
if no
genetic map is specifieddata
- input data for the current marker windowoverlapHaps
- haplotype constraints in the overlap with previous
window or null
if no such constraints existjava.lang.IllegalArgumentException
- if
(overlapHaps != null
&& data.targetSamples().equals(overlapHaps.samples()) == false)
java.lang.IllegalArgumentException
- if
(overlapHaps != null &&
overlapHaps.marker(j).equals(data.targGT().marker(j) == false)
for some j
satisfying
(0 <= j && j <= overlapHaps.nMarkers())
java.lang.IllegalArgumentException
- if
overlapHaps != null && overlapHaps.isPhased() == false
java.lang.NullPointerException
- if any parameter is null
public Par par()
public int window()
public int nextOverlapStart()
this.nMarkers()
the next marker window is from
a different chromosome.public int nextTargetOverlapStart()
this.nMarkers()
if there is no overlap or if there are
no target markers in the overlap.public int prevSpliceStart()
public int nextSpliceStart()
this.nMarkers()
if there is no overlap or if there are
no markers after the splice point.public int prevTargetSpliceStart()
public int nextTargetSpliceStart()
this.nTargMarkers()
if there is no overlap or if there are
no target markers after the splice pointpublic Pedigree ped()
public int nRefHaps()
public int nRefSamples()
public Samples refSamples()
null
if
there are no reference samples.null
if
there are no reference samplespublic int nTargHaps()
public int nTargetSamples()
public Samples targSamples()
public int nHaps()
public int nAllSamples()
public Samples allSamples()
this.targetSamples()
. Reference samples are listed last
in the same order as the list returned by this.refSamples()
.public int nTargMarkers()
public Markers targMarkers()
public int nMarkers()
public Markers markers()
public int markerIndex(int targetMarker)
targetMarker
- index of a marker in the list of target data markersjava.lang.IndexOutOfBoundsException
- if
targetMarker < 0 || targetMarker >= this.nTargMarkers()
public int[] markerIndices()
this.nTargMarkers()
which maps
the k
-th marker in the list of target data markers to the
index of the marker in the list of reference data markers.this.nTargMarkers()
which maps
the k
-th marker in the list of target data markers to the
index of the marker in the list of reference data markerspublic int targMarkerIndex(int marker)
marker
- index of a marker in the reference datajava.lang.IndexOutOfBoundsException
- if
marker < 0 || marker >= this.nMarkers()
.public int[] targMarkerIndices()
this.nMarkers()
whose k
-th
element is the index of the k
-th marker in the list of target
markers or is -1 if the marker is not present in the target data.this.nMarkers()
whose k
-th
element is the index of the k
-th marker in the list of target
markers or is -1 if the marker is not present in the target datapublic java.util.List<HapPair> addRestrictedRefHapPairs(java.util.List<BitHapPair> list)
list
- a list of haplotype pairs for target data markersjava.lang.NullPointerException
- if list == null
public RefGT refGT()
null
if there are no reference data.null
if there are no
reference datapublic RefGT restrictRefGT()
null
if there are no reference data.null
if there are no reference datapublic GT targGT()
public float intensity()
public MarkerMap map()
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,