Package imp

Class ImputedVcfWriter


  • public class ImputedVcfWriter
    extends java.lang.Object

    Class ImputedVcfWriter writes observed and imputed genotypes to a VCF output file.

    Instances of class ImputedVcfWriter are not thread-safe.

    • Constructor Summary

      Constructors 
      Constructor Description
      ImputedVcfWriter​(ImpData impData, int refStart, int refEnd, int targCluster)
      Constructs a new ImputedVcfWriter instance from the specified data.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void appendRecords​(java.util.concurrent.atomic.AtomicReferenceArray<StateProbs> stateProbs, java.io.PrintWriter out)
      Writes the VCF records to the specified PrintWriter.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ImputedVcfWriter

        public ImputedVcfWriter​(ImpData impData,
                                int refStart,
                                int refEnd,
                                int targCluster)
        Constructs a new ImputedVcfWriter instance from the specified data.
        Parameters:
        impData - the input data for genotype imputation
        targCluster - the index of the target marker cluster in the interval of reference markers that will be printed
        refStart - an lower bound (inclusive) on the reference markers that will be printed
        refEnd - an upper bound (exclusive) on the reference markers that will be printed
        Throws:
        java.lang.IndexOutOfBoundsException - if (refStart < 0 || refEnd > impData.refGT().nMarkers())
        java.lang.IndexOutOfBoundsException - if targCluster < 0 || targCluster >= impData.nClusters()
        java.lang.NullPointerException - if impData == null
    • Method Detail

      • appendRecords

        public void appendRecords​(java.util.concurrent.atomic.AtomicReferenceArray<StateProbs> stateProbs,
                                  java.io.PrintWriter out)
        Writes the VCF records to the specified PrintWriter.
        Parameters:
        stateProbs - the imputed state probabilities at genotyped markers in the target samples
        out - the PrintWriter to which VCF records will be written
        Throws:
        java.lang.NullPointerException - if stateProbs == null || out == null
        java.lang.NullPointerException - if there exists a j satisfying (0 <= j && j < stateProbs.size()) && (stateProbs.get(j) == null)