Package imp
Class ImputedVcfWriter
- java.lang.Object
-
- imp.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 newImputedVcfWriter
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 specifiedPrintWriter
.
-
-
-
Constructor Detail
-
ImputedVcfWriter
public ImputedVcfWriter(ImpData impData, int refStart, int refEnd, int targCluster)
Constructs a newImputedVcfWriter
instance 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
- thePrintWriter
to which VCF records will be written- Throws:
java.lang.NullPointerException
- ifstateProbs == null || out == null
java.lang.NullPointerException
- if there exists aj
satisfying(0 <= j && j < stateProbs.size()) && (stateProbs.get(j) == null)
-
-