Package vcf
Interface SlidingWindow
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable
- All Known Implementing Classes:
RefTargSlidingWindow,TargSlidingWindow
public interface SlidingWindow extends java.io.CloseableInterface
SlidingWindowrepresents a sliding window of VCF records.Instances of class
SlidingWindoware not thread-safe.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static <E> voidaddToQ(java.util.concurrent.BlockingQueue<E> q, E e)Adds the specified element to the specified queue.voidclose()Releases any I/O resources controlled by this object.intcumMarkers()Returns the number of distinct markers returned in precedingthis.nextWindow()method calls.intcumTargMarkers()Returns the number of distinct target markers returned in precedingthis.nextWindow()method calls.GeneticMapgenMap()Returns the genetic map.java.util.Optional<Window>nextWindow()Returns the next sliding window of VCF records.Pedigreeped()Returns the target sample pedigree data.static <E> EtakeFromQ(java.util.concurrent.BlockingQueue<E> q)Takes and returns an element from the specified queue.SamplestargSamples()Returns the target samples.
-
-
-
Method Detail
-
targSamples
Samples targSamples()
Returns the target samples.- Returns:
- the target samples
-
ped
Pedigree ped()
Returns the target sample pedigree data.- Returns:
- the target sample pedigree data
-
genMap
GeneticMap genMap()
Returns the genetic map.- Returns:
- the genetic map
-
cumTargMarkers
int cumTargMarkers()
Returns the number of distinct target markers returned in precedingthis.nextWindow()method calls.- Returns:
- the number of distinct target markers returned in
preceding
this.nextWindow()method calls
-
cumMarkers
int cumMarkers()
Returns the number of distinct markers returned in precedingthis.nextWindow()method calls.- Returns:
- the number of distinct markers returned in
preceding
this.nextWindow()method calls
-
nextWindow
java.util.Optional<Window> nextWindow()
Returns the next sliding window of VCF records.- Returns:
- the next sliding window of VCF records or
Optional.empty()if there are no additional windows. - Throws:
java.lang.IllegalArgumentException- if a format error in the input data is detected
-
close
void close()
Releases any I/O resources controlled by this object.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
takeFromQ
static <E> E takeFromQ(java.util.concurrent.BlockingQueue<E> q)
Takes and returns an element from the specified queue.- Type Parameters:
E- the element type- Parameters:
q- the queue- Returns:
- an element from the specified queue
- Throws:
java.lang.NullPointerException- ifq == nulljava.lang.RuntimeException- if anInterruptedExceptionis thrown while waiting to take an element
-
addToQ
static <E> void addToQ(java.util.concurrent.BlockingQueue<E> q, E e)Adds the specified element to the specified queue.- Type Parameters:
E- the element type- Parameters:
q- the queuee- the element to be added- Throws:
java.lang.NullPointerException- ifq == nulljava.lang.RuntimeException- if anInterruptedExceptionis thrown while waiting to add the element
-
-