Package vcf

Interface SlidingWindow

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
RefTargSlidingWindow, TargSlidingWindow

public interface SlidingWindow extends Closeable

Interface SlidingWindow represents a sliding window of VCF records.

Instances of class SlidingWindow are not thread-safe.

  • Method Summary

    Modifier and Type
    Method
    Description
    static <E> void
    addToQ(BlockingQueue<E> q, E e)
    Adds the specified element to the specified queue.
    void
    Releases any I/O resources controlled by this object.
    int
    Returns the number of distinct markers returned in preceding this.nextWindow() method calls.
    int
    Returns the number of distinct target markers returned in preceding this.nextWindow() method calls.
    Returns the genetic map.
    Returns the next sliding window of VCF records.
    ped()
    Returns the target sample pedigree data.
    static <E> E
    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 preceding this.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 preceding this.nextWindow() method calls.
      Returns:
      the number of distinct markers returned in preceding this.nextWindow() method calls
    • nextWindow

      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:
      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 interface AutoCloseable
      Specified by:
      close in interface Closeable
    • takeFromQ

      static <E> E takeFromQ(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:
      NullPointerException - if q == null
      RuntimeException - if an InterruptedException is thrown while waiting to take an element
    • addToQ

      static <E> void addToQ(BlockingQueue<E> q, E e)
      Adds the specified element to the specified queue.
      Type Parameters:
      E - the element type
      Parameters:
      q - the queue
      e - the element to be added
      Throws:
      NullPointerException - if q == null
      RuntimeException - if an InterruptedException is thrown while waiting to add the element