Class ReblockingGVCFBlockCombiner
java.lang.Object
org.broadinstitute.hellbender.utils.variant.writers.GVCFBlockCombiner
org.broadinstitute.hellbender.utils.variant.writers.ReblockingGVCFBlockCombiner
- All Implemented Interfaces:
PushPullTransformer<htsjdk.variant.variantcontext.VariantContext>
public class ReblockingGVCFBlockCombiner
extends GVCFBlockCombiner
implements PushPullTransformer<htsjdk.variant.variantcontext.VariantContext>
Combines variants into GVCF blocks.
-
Method Summary
Modifier and TypeMethodDescriptionprotected htsjdk.variant.variantcontext.VariantContext
addHomRefSite
(htsjdk.variant.variantcontext.VariantContext vc, htsjdk.variant.variantcontext.Genotype g) Add hom-ref site from vc to this gVCF hom-ref state tracking, emitting any pending states if appropriateint
int
int
boolean
static void
moveBuilderStart
(htsjdk.variant.variantcontext.VariantContextBuilder builder, int newStart, CachingIndexedFastaSequenceFile referenceReader) Modifies ref block builder to change start position and update ref allele accordingly in VC and genotypesvoid
Used to tell the transformer that no more items will be submitted to it, and that it should finalize any pending items.void
submit
(htsjdk.variant.variantcontext.VariantContext variantContextToOutput) Add the input as a new reference block or write and remove ref blocks that end before the variantContext if it is variant Trim ref block if the variant occurs in the middle of a blockMethods inherited from class org.broadinstitute.hellbender.utils.variant.writers.GVCFBlockCombiner
addRangesToHeader, consumeFinalizedItems, hasFinalizedItems
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.broadinstitute.hellbender.utils.iterators.PushPullTransformer
consumeFinalizedItems, hasFinalizedItems, submit
-
Method Details
-
addHomRefSite
protected htsjdk.variant.variantcontext.VariantContext addHomRefSite(htsjdk.variant.variantcontext.VariantContext vc, htsjdk.variant.variantcontext.Genotype g) Add hom-ref site from vc to this gVCF hom-ref state tracking, emitting any pending states if appropriate- Overrides:
addHomRefSite
in classGVCFBlockCombiner
- Parameters:
vc
- a non-null VariantContextg
- a non-null genotype from VariantContext- Returns:
- a VariantContext to be emitted, or null if non is appropriate
-
submit
public void submit(htsjdk.variant.variantcontext.VariantContext variantContextToOutput) Add the input as a new reference block or write and remove ref blocks that end before the variantContext if it is variant Trim ref block if the variant occurs in the middle of a block- Specified by:
submit
in interfacePushPullTransformer<htsjdk.variant.variantcontext.VariantContext>
- Overrides:
submit
in classGVCFBlockCombiner
- Parameters:
variantContextToOutput
- may be variant or reference, can overlap existing ref blocks in buffer, but should never start before vcfOutputEnd
-
moveBuilderStart
public static void moveBuilderStart(htsjdk.variant.variantcontext.VariantContextBuilder builder, int newStart, CachingIndexedFastaSequenceFile referenceReader) Modifies ref block builder to change start position and update ref allele accordingly in VC and genotypes- Parameters:
builder
- a builder for a reference block, contains only NON_REF, no other ALTsnewStart
- the new position for the reference block
-
getVcfOutputEnd
public int getVcfOutputEnd() -
getCurrentContig
-
getBufferEnd
public int getBufferEnd() -
isBufferEmpty
public boolean isBufferEmpty() -
getBufferStart
public int getBufferStart() -
signalEndOfInput
public void signalEndOfInput()Description copied from interface:PushPullTransformer
Used to tell the transformer that no more items will be submitted to it, and that it should finalize any pending items.- Specified by:
signalEndOfInput
in interfacePushPullTransformer<htsjdk.variant.variantcontext.VariantContext>
- Overrides:
signalEndOfInput
in classGVCFBlockCombiner
-