public class RestrictedVcfWindow
extends java.lang.Object
implements java.io.Closeable
Class RestrictedVcfWindow represents a sliding window of VCF
records.
Instances of class RestrictedVcfWindow are not thread.safe.
| Constructor and Description |
|---|
RestrictedVcfWindow(SampleFileIt<? extends VcfEmission> it)
Construct a new
RestrictedVcfWindow instance. |
| Modifier and Type | Method and Description |
|---|---|
VcfEmission[] |
advanceWindow(Markers nextMarkers)
Advances the sliding marker window, and returns the advanced window
as a
VcfEmission[] object. |
void |
close()
Releases any I/O resources controlled by this object.
|
int |
cumMarkerCnt()
Returns the number of VCF records in the union of the current window
and all previous windows.
|
java.io.File |
file()
Returns the file from which VCF records are read, or returns
null if the source is standard input. |
int |
nSamples()
Returns the number of samples.
|
int |
overlap()
Returns the number of VCF records in the overlap between the current
window and the previous window.
|
Samples |
samples()
Returns the list of samples.
|
java.lang.String |
toString()
Returns a string representation of
this. |
public RestrictedVcfWindow(SampleFileIt<? extends VcfEmission> it)
RestrictedVcfWindow instance.it - an iterator that returns VCF records.java.lang.IllegalArgumentException - if it.hasNext() == falsejava.lang.IllegalArgumentException - if a format error is detected in
a VCF recordjava.lang.NullPointerException - if it == nullpublic VcfEmission[] advanceWindow(Markers nextMarkers)
VcfEmission[] object.
The returned array will have length markers.nMarkers().
Markers not found in the data source will have null
entries in the returned array.nextMarkers - the set of markers in the advanced windowjava.lang.IllegalArgumentException - if markers.nMarkers() == 0java.lang.IllegalArgumentException - if any two of the specified markers
are on different chromosomesjava.lang.IllegalArgumentException - if specified markers are
inconsistent with a sliding marker windowjava.lang.IllegalArgumentException - if the specified markers do not
advance the current marker windowjava.lang.IllegalArgumentException - if a format error is detected in a
VCF recordjava.lang.IllegalArgumentException - if the input data does not contain
any of the specified markersjava.lang.NullPointerException - if nextMarkers == nullpublic java.io.File file()
null if the source is standard input.null if the source is standard inputpublic Samples samples()
public int nSamples()
public int overlap()
public int cumMarkerCnt()
public void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic java.lang.String toString()
this. The exact
details of the representation are unspecified and subject to change.toString in class java.lang.Objectthis