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 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 class GVCFBlockCombiner
      Parameters:
      vc - a non-null VariantContext
      g - 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 interface PushPullTransformer<htsjdk.variant.variantcontext.VariantContext>
      Overrides:
      submit in class GVCFBlockCombiner
      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 ALTs
      newStart - the new position for the reference block
    • getVcfOutputEnd

      public int getVcfOutputEnd()
    • getCurrentContig

      public String 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 interface PushPullTransformer<htsjdk.variant.variantcontext.VariantContext>
      Overrides:
      signalEndOfInput in class GVCFBlockCombiner