Class HaplotypeBAMDestination

java.lang.Object
org.broadinstitute.hellbender.utils.haplotype.HaplotypeBAMDestination
Direct Known Subclasses:
SAMFileDestination

public abstract class HaplotypeBAMDestination extends Object
Utility class that allows easy creation of destinations for the HaplotypeBAMWriters
  • Constructor Details

    • HaplotypeBAMDestination

      protected HaplotypeBAMDestination(htsjdk.samtools.SAMFileHeader sourceHeader, Optional<String> haplotypeReadGroupID)
      Create a new HaplotypeBAMDestination
      Parameters:
      sourceHeader - SAMFileHeader used to seed the output SAMFileHeader for this destination.
      haplotypeReadGroupID - read group ID used when writing haplotypes as reads. Empty if HaplotypeBAMWriter.WriterType == NO_HAPLOTYPES.
  • Method Details

    • add

      public abstract void add(GATKRead read)
      Write a read to the output specified by this destination.
      Parameters:
      read - the read to write out
    • getHaplotypeReadGroupID

      public Optional<String> getHaplotypeReadGroupID()
      Get the read group ID that is used by this writer when writing halpotypes as reads. If HaplotypeBAMWriter.WriterType is NO_HAPLOTYPES, then returns Optional.empty()
      Returns:
      read group ID
    • getHaplotypeSampleTag

      public String getHaplotypeSampleTag()
      Get the sample tag that is used by this writer when writing halpotypes as reads.
      Returns:
      sample tag
    • getBAMOutputHeader

      public htsjdk.samtools.SAMFileHeader getBAMOutputHeader()
      Get the SAMFileHeader that is used for writing the output for this destination.
      Returns:
      output SAMFileHeader