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 newImputedVcfWriter
instance from the specified data. -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendRecords
(AtomicReferenceArray<StateProbs> stateProbs, PrintWriter out) Writes the VCF records to the specifiedPrintWriter
.
-
Constructor Details
-
ImputedVcfWriter
Constructs a newImputedVcfWriter
instance 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
- thePrintWriter
to which VCF records will be written- Throws:
NullPointerException
- ifstateProbs == null || out == null
NullPointerException
- if there exists aj
satisfying(0 <= j && j < stateProbs.size()) && (stateProbs.get(j) == null)
-