Modifier and Type | Method | Description |
---|---|---|
void |
advanceWindowCm() |
Advances the sliding window of VCF records.
|
Samples |
allSamples() |
Returns a list of all target and reference samples.
|
boolean |
canAdvanceWindow() |
Returns
true if the sliding window of VCF records can advance
and returns false otherwise. |
void |
close() |
Releases any I/O resources controlled by this object.
|
GeneticMap |
genMap() |
Returns the genetic map.
|
boolean |
lastWindowOnChrom() |
Returns
true if the current window of VCF records is the last
window for the chromosome and returns false otherwise. |
int |
markerIndex(int nonRefIndex) |
Returns the marker index corresponding to the
specified target data marker.
|
Markers |
markers() |
Returns the list of markers in the current window.
|
int |
nAllSamples() |
Returns the total 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.
|
int |
nMarkers() |
Returns the number of markers in the current window.
|
int |
nMarkersSoFar() |
Returns the number of markers in the union of the current window
and all previous windows.
|
int |
nRefSamples() |
Returns the number of reference samples.
|
int |
nTargetMarkers() |
Returns the number of target data markers in the current window.
|
int |
nTargetMarkersSoFar() |
Returns the number of target VCF records in the union of the
current window and all previous windows.
|
int |
nTargetSamples() |
Returns the number of target samples.
|
int |
overlap() |
Returns the number of VCF records in the overlap between the current
window and the previous window.
|
Pedigree |
ped() |
Returns the pedigree.
|
RefGT |
refGT() |
Returns the phased, nonmissing reference genotype data
for the current window, or
null if there are no reference data |
java.util.List<HapPair> |
refHapPairs() |
Returns a list of the reference haplotype pairs for the current
window.
|
Samples |
refSamples() |
Returns the list of reference samples, or
null if
there are no reference samples. |
java.util.List<HapPair> |
restrictedRefHapPairs() |
Returns a list of reference haplotype pairs that are restricted
to the target data markers in the current window.
|
RefGT |
restrictRefGT() |
Returns the phased, nonmissing reference genotype data
for the target data markers in the current window.
|
static TargetData |
targetData(Par par,
java.util.function.Supplier<SampleFileIt<GTRec>> supplier) |
Constructs and returns a new
TargetData instance from
VcfRecords returned by the specified SampleFileIt objects. |
int |
targetMarkerIndex(int refIndex) |
Returns the target data marker index corresponding to the specified
marker, or returns -1 if no corresponding target data marker exists.
|
Markers |
targetMarkers() |
Returns the list of target data markers in the current window.
|
int |
targetOverlap() |
Returns the number of target data markers in the overlap between
the current marker window and the previous marker window.
|
Samples |
targetSamples() |
Returns the list of target samples.
|
GT |
targGT() |
Returns the genotype likelihoods for the target samples
restricted to the target data markers in the current window.
|
java.lang.String |
toString() |
Returns a string representation of
this . |
int |
windowIndex() |
Returns the current window index.
|
public static TargetData targetData(Par par, java.util.function.Supplier<SampleFileIt<GTRec>> supplier)
TargetData
instance from
VcfRecords returned by the specified SampleFileIt
objects.supplier
- a supplier for the sample file iteratorpar
- the command line parametersTargetData
instancejava.lang.IllegalArgumentException
- if the data returned by
the specified iterator contains no samplesjava.lang.IllegalArgumentException
- if a format error is detected
in a string VCF recordjava.lang.IllegalArgumentException
- if
overlap < 0 || Float.isFinite(overlap) == false
java.lang.IllegalArgumentException
- if
window <= overlap || Float.isFinite(window) == false
java.lang.NullPointerException
- if
it == null || ped == null || genMap == null
public GeneticMap genMap()
Data
public boolean lastWindowOnChrom()
Data
true
if the current window of VCF records is the last
window for the chromosome and returns false
otherwise.lastWindowOnChrom
in interface Data
true
if the current window of VCF records is the last
window for the chromosomepublic boolean canAdvanceWindow()
Data
true
if the sliding window of VCF records can advance
and returns false
otherwise.canAdvanceWindow
in interface Data
true
if the sliding window of VCF records can advancepublic void advanceWindowCm()
Data
advanceWindowCm
in interface Data
public int windowIndex()
Data
windowIndex
in interface Data
public int targetOverlap()
Data
targetOverlap
in interface Data
public int overlap()
Data
public int nextOverlapStart()
Data
this.nMarkers()
if the next marker window is from a
different chromosome.nextOverlapStart
in interface Data
public int nTargetMarkers()
Data
nTargetMarkers
in interface Data
public int nTargetMarkersSoFar()
Data
nTargetMarkersSoFar
in interface Data
public Markers targetMarkers()
Data
targetMarkers
in interface Data
public int nMarkers()
Data
public int nMarkersSoFar()
Data
nMarkersSoFar
in interface Data
public Markers markers()
Data
public int targetMarkerIndex(int refIndex)
Data
targetMarkerIndex
in interface Data
refIndex
- a marker indexpublic int markerIndex(int nonRefIndex)
Data
markerIndex
in interface Data
nonRefIndex
- a target data marker indexpublic int nTargetSamples()
Data
nTargetSamples
in interface Data
public Samples targetSamples()
Data
targetSamples
in interface Data
public int nRefSamples()
Data
nRefSamples
in interface Data
public Samples refSamples()
Data
null
if
there are no reference samples.refSamples
in interface Data
null
if
there are no reference samplespublic int nAllSamples()
Data
nAllSamples
in interface Data
public Samples allSamples()
Data
this.targetSamples()
. Reference samples are listed last
in the same order as the list returned by this.refSamples()
.allSamples
in interface Data
public GT targGT()
Data
GL
instance will contain no markers if
this.advanceWindow()
has not yet been invoked.public java.util.List<HapPair> restrictedRefHapPairs()
Data
this.advanceWindow()
has not yet been invoked.restrictedRefHapPairs
in interface Data
public java.util.List<HapPair> refHapPairs()
Data
this.advanceWindow()
has not yet been invoked.refHapPairs
in interface Data
public RefGT refGT()
Data
null
if there are no reference datapublic RefGT restrictRefGT()
Data
null
if there are no reference datarestrictRefGT
in interface Data
null
if there are no reference datapublic void close()
Data
public java.lang.String toString()
this
. The exact
details of the representation are unspecified and subject to change.toString
in class java.lang.Object
this
.