Package imp
Class ImputedVcfWriter
- java.lang.Object
-
- imp.ImputedVcfWriter
-
public class ImputedVcfWriter extends java.lang.ObjectClass
ImputedVcfWriterwrites observed and imputed genotypes to a VCF output file.Instances of class
ImputedVcfWriterare not thread-safe.
-
-
Constructor Summary
Constructors Constructor Description ImputedVcfWriter(ImpData impData, int refStart, int refEnd, int targCluster)Constructs a newImputedVcfWriterinstance from the specified data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendRecords(java.util.concurrent.atomic.AtomicReferenceArray<StateProbs> stateProbs, java.io.PrintWriter out)Writes the VCF records to the specifiedPrintWriter.
-
-
-
Constructor Detail
-
ImputedVcfWriter
public ImputedVcfWriter(ImpData impData, int refStart, int refEnd, int targCluster)
Constructs a newImputedVcfWriterinstance from the specified data.- Parameters:
impData- the input data for genotype imputationtargCluster- the index of the target marker cluster in the interval of reference markers that will be printedrefStart- an lower bound (inclusive) on the reference markers that will be printedrefEnd- 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- iftargCluster < 0 || targCluster >= impData.nClusters()java.lang.NullPointerException- ifimpData == null
-
-
Method Detail
-
appendRecords
public void appendRecords(java.util.concurrent.atomic.AtomicReferenceArray<StateProbs> stateProbs, java.io.PrintWriter out)
Writes the VCF records to the specifiedPrintWriter.- Parameters:
stateProbs- the imputed state probabilities at genotyped markers in the target samplesout- thePrintWriterto which VCF records will be written- Throws:
java.lang.NullPointerException- ifstateProbs == null || out == nulljava.lang.NullPointerException- if there exists ajsatisfying(0 <= j && j < stateProbs.size()) && (stateProbs.get(j) == null)
-
-