Package imp
Class ImputedVcfWriter
java.lang.Object
imp.ImputedVcfWriter
Class ImputedVcfWriter writes observed and imputed genotypes
to a VCF output file.
Instances of class ImputedVcfWriter are not thread-safe.
-
Constructor Summary
ConstructorsConstructorDescriptionImputedVcfWriter(ImpData impData, int refStart, int refEnd, int targCluster) Constructs a newImputedVcfWriterinstance from the specified data. -
Method Summary
Modifier and TypeMethodDescriptionvoidappendRecords(AtomicReferenceArray<StateProbs> stateProbs, PrintWriter out) Writes the VCF records to the specifiedPrintWriter.
-
Constructor Details
-
ImputedVcfWriter
Constructs a newImputedVcfWriterinstance from the specified data.- Parameters:
impData- the input data for genotype imputationrefStart- an lower bound (inclusive) on the reference markers that will be printedrefEnd- an upper bound (exclusive) on the reference markers that will be printedtargCluster- the index of the target marker cluster in the interval of reference markers that will be printed- Throws:
IndexOutOfBoundsException- if(refStart < 0 || refEnd > impData.refGT().nMarkers())IndexOutOfBoundsException- iftargCluster < 0 || targCluster >= impData.nClusters()NullPointerException- ifimpData == null
-
-
Method Details
-
appendRecords
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:
NullPointerException- ifstateProbs == null || out == nullNullPointerException- if there exists ajsatisfying(0 <= j && j < stateProbs.size()) && (stateProbs.get(j) == null)
-