Package vcf

Class TargSlidingWindow

java.lang.Object
vcf.TargSlidingWindow
All Implemented Interfaces:
Closeable, AutoCloseable, SlidingWindow

public class TargSlidingWindow extends Object implements SlidingWindow

Class TargSlidingWindow represents a sliding window of target VCF records.

Instances of class TargSlidingWindow are not thread-safe.

  • Method Details

    • instance

      public static TargSlidingWindow instance(Par par)
      Constructs and returns a new TargSlidingWindow instance for the specified target data.
      Parameters:
      par - the command line parameters
      Returns:
      a new TargSlidingWindow instance for the specified target data
      Throws:
      IllegalArgumentException - if par.ref() != null
      IllegalArgumentException - if a VCF record format error is detected or if there is no data remaining after sample and marker filtering
      NullPointerException - if par == null
    • targSamples

      public Samples targSamples()
      Description copied from interface: SlidingWindow
      Returns the target samples.
      Specified by:
      targSamples in interface SlidingWindow
      Returns:
      the target samples
    • ped

      public Pedigree ped()
      Description copied from interface: SlidingWindow
      Returns the target sample pedigree data.
      Specified by:
      ped in interface SlidingWindow
      Returns:
      the target sample pedigree data
    • genMap

      public GeneticMap genMap()
      Description copied from interface: SlidingWindow
      Returns the genetic map.
      Specified by:
      genMap in interface SlidingWindow
      Returns:
      the genetic map
    • cumTargMarkers

      public int cumTargMarkers()
      Description copied from interface: SlidingWindow
      Returns the number of distinct target markers returned in preceding this.nextWindow() method calls.
      Specified by:
      cumTargMarkers in interface SlidingWindow
      Returns:
      the number of distinct target markers returned in preceding this.nextWindow() method calls
    • cumMarkers

      public int cumMarkers()
      Description copied from interface: SlidingWindow
      Returns the number of distinct markers returned in preceding this.nextWindow() method calls.
      Specified by:
      cumMarkers in interface SlidingWindow
      Returns:
      the number of distinct markers returned in preceding this.nextWindow() method calls
    • nextWindow

      public Optional<Window> nextWindow()
      Description copied from interface: SlidingWindow
      Returns the next sliding window of VCF records.
      Specified by:
      nextWindow in interface SlidingWindow
      Returns:
      the next sliding window of VCF records or Optional.empty() if there are no additional windows.
    • close

      public void close()
      Description copied from interface: SlidingWindow
      Releases any I/O resources controlled by this object.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface SlidingWindow
    • toString

      public String toString()
      Returns a string representation of this. The exact details of the representation are unspecified and subject to change.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this.