Package vcf
Interface SlidingWindow
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
RefTargSlidingWindow
,TargSlidingWindow
Interface SlidingWindow
represents a sliding window of VCF
records.
Instances of class SlidingWindow
are not thread-safe.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E> void
addToQ
(BlockingQueue<E> q, E e) Adds the specified element to the specified queue.void
close()
Releases any I/O resources controlled by this object.int
Returns the number of distinct markers returned in precedingthis.nextWindow()
method calls.int
Returns the number of distinct target markers returned in precedingthis.nextWindow()
method calls.genMap()
Returns the genetic map.Returns the next sliding window of VCF records.ped()
Returns the target sample pedigree data.static <E> E
takeFromQ
(BlockingQueue<E> q) Takes and returns an element from the specified queue.Returns the target samples.
-
Method Details
-
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
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:
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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
takeFromQ
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:
NullPointerException
- ifq == null
RuntimeException
- if anInterruptedException
is thrown while waiting to take an element
-
addToQ
Adds the specified element to the specified queue.- Type Parameters:
E
- the element type- Parameters:
q
- the queuee
- the element to be added- Throws:
NullPointerException
- ifq == null
RuntimeException
- if anInterruptedException
is thrown while waiting to add the element
-