Package vcf

Interface Data

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable
    All Known Implementing Classes:
    AllData, TargetData

    public interface Data
    extends java.io.Closeable
    Interface Data represents a sliding window of target VCF records or a sliding window of reference and target VCF records.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void advanceWindowCm()
      Advances the sliding window of VCF records.
      boolean canAdvanceWindow()
      Returns true if the sliding window of VCF records can advance and returns false otherwise.
      IntArray[][] carriers​(int maxCarriers)
      Returns the indices of the reference and target carriers for each low-frequency allele at the target data markers.
      void close()
      Releases any I/O resources controlled by this object.
      GeneticMap genMap()
      Returns the genetic map.
      boolean lastWindowOnChrom()
      Returns true if the current window of VCF records is the last window for the chromosome and returns false otherwise.
      MarkerIndices markerIndices()
      Return a MarkerIndices instance which stores the overlap with the current marker window and adjacent marker windows and the mappings between marker indices and target marker indices.
      int nMarkers()
      Returns the number of markers in the current window.
      int nMarkersSoFar()
      Returns the number of markers in the union of the current window and all previous windows.
      int nTargMarkersSoFar()
      Returns the number of target VCF records in the union of the current window and all previous windows.
      Pedigree ped()
      Returns the pedigree.
      RefGT refGT()
      Returns the phased, nonmissing reference genotype data for the current window, or null if there are no reference data
      RefGT restrictRefGT()
      Returns the phased, nonmissing reference genotype data for the target data markers in the current window.
      GT targGT()
      Returns the genotype likelihoods for the target samples restricted to the target data markers in the current window.
      int windowIndex()
      Returns the current window index.
    • Field Detail

      • ZERO_FREQ_ARRAY

        static final IntArray ZERO_FREQ_ARRAY
      • HIGH_FREQ_ARRAY

        static final IntArray HIGH_FREQ_ARRAY
    • Method Detail

      • ped

        Pedigree ped()
        Returns the pedigree.
        Returns:
        the pedigree
      • genMap

        GeneticMap genMap()
        Returns the genetic map.
        Returns:
        the genetic map
      • lastWindowOnChrom

        boolean lastWindowOnChrom()
        Returns true if the current window of VCF records is the last window for the chromosome and returns false otherwise.
        Returns:
        true if the current window of VCF records is the last window for the chromosome
      • canAdvanceWindow

        boolean canAdvanceWindow()
        Returns true if the sliding window of VCF records can advance and returns false otherwise.
        Returns:
        true if the sliding window of VCF records can advance
      • advanceWindowCm

        void advanceWindowCm()
        Advances the sliding window of VCF records.
        Throws:
        java.lang.IllegalArgumentException - if a format error in the input data is detected
        java.lang.IllegalStateException - if this.canAdvanceWindow() == false
      • windowIndex

        int windowIndex()
        Returns the current window index. The first window has index 1.
        Returns:
        the current window index
      • nTargMarkersSoFar

        int nTargMarkersSoFar()
        Returns the number of target VCF records in the union of the current window and all previous windows.
        Returns:
        the number of target VCF records in the union of the current window and all previous windows
      • nMarkers

        int nMarkers()
        Returns the number of markers in the current window.
        Returns:
        the number of markers in the current window
      • nMarkersSoFar

        int nMarkersSoFar()
        Returns the number of markers in the union of the current window and all previous windows.
        Returns:
        the number of markers in the union of the current window and all previous windows
      • targGT

        GT targGT()
        Returns the genotype likelihoods for the target samples restricted to the target data markers in the current window. The returned GL instance will contain no markers if this.advanceWindow() has not yet been invoked.
        Returns:
        the genotype likelihoods for the target samples restricted to the target data markers in the current window
      • refGT

        RefGT refGT()
        Returns the phased, nonmissing reference genotype data for the current window, or null if there are no reference data
        Returns:
        the reference genotype data for the current window or null if there are no reference data
      • restrictRefGT

        RefGT restrictRefGT()
        Returns the phased, nonmissing reference genotype data for the target data markers in the current window. Returns null if there are no reference data
        Returns:
        the reference genotype data for the target data markers in the current window or null if there are no reference data
      • carriers

        IntArray[][] carriers​(int maxCarriers)

        Returns the indices of the reference and target carriers for each low-frequency allele at the target data markers. The reference sample indices will be shifted by the number of target samples so that the first reference sample will have an index equal to the number of target samples. An element of the returned array will be empty and equal to Data.ZERO_FREQ_ARRAY if the allele has no carriers, and the the element will be empty and equal to Data.HIGH_FREQ_ARRAY if the number of carriers of the allele exceeds the specified maximum number of carriers.

        The list of carriers for the k-th allele of the j-th target marker are stored in entry (j, k) of the returned array. if the number of carriers is less than or equal to the specified maximum number of carriers.

        Parameters:
        maxCarriers - the maximum number of carriers in any list of the returned array.
        Returns:
        the indices of the reference and target carriers for each low-frequency allele
      • markerIndices

        MarkerIndices markerIndices()
        Return a MarkerIndices instance which stores the overlap with the current marker window and adjacent marker windows and the mappings between marker indices and target marker indices.
        Returns:
        a MarkerIndices instance
      • close

        void close()
        Releases any I/O resources controlled by this object.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable