class_docstr: Haplotype-based variant labeler.
class_docstr_tok: ["Haplotype-based","variant","labeler","."]
docstr: Creates a new HaplotypeVariantLabeler.
  
  Args:
    truth_vcf_reader: a VcfReader object that points to our truth variant set.
    ref_reader: A FastaReader object we can use to get reference bases.
    confident_regions: A RangeSet containing all of the confidently called
      regions. A variant that falls outside of one of these regions will be
      receive a special not-confident marker.
    max_group_size: int >= 1. The maximum number of variants we'll attempt to
      label together. Larger values increase the runtime of the algorithm.
    max_separation: int >= 0. The maximum distance between variants within a
      group. Sequential variants separated by more than this value will be
      placed in separate groups for labeling.
    max_gt_options_product: int >= 0. The maximum number of combinations of
      genotypes (product of all genotypes in the group).
  
  Raises:
    ValueError: if vcf_reader is None.
code: def __init__(
      self,
      truth_vcf_reader,
      ref_reader,
      confident_regions,
      max_group_size=_MAX_GROUP_SIZE,
      max_separation=_MAX_SEPARATION_WITHIN_VARIANT_GROUP,
      max_gt_options_product=_MAX_GT_OPTIONS_PRODUCT,
  ):
      """Creates a new HaplotypeVariantLabeler.
  
      Args:
        truth_vcf_reader: a VcfReader object that points to our truth variant set.
        ref_reader: A FastaReader object we can use to get reference bases.
        confident_regions: A RangeSet containing all of the confidently called
          regions. A variant that falls outside of one of these regions will be
          receive a special not-confident marker.
        max_group_size: int >= 1. The maximum number of variants we'll attempt to
          label together. Larger values increase the runtime of the algorithm.
        max_separation: int >= 0. The maximum distance between variants within a
          group. Sequential variants separated by more than this value will be
          placed in separate groups for labeling.
        max_gt_options_product: int >= 0. The maximum number of combinations of
          genotypes (product of all genotypes in the group).
  
      Raises:
        ValueError: if vcf_reader is None.
      """
      super(HaplotypeLabeler, self).__init__(
          truth_vcf_reader=truth_vcf_reader,
          confident_regions=confident_regions,
      )
      if confident_regions is None:
          raise ValueError(
              "confident_regions cannot be None for HaplotypeLabeler."
          )
      self._ref_reader = ref_reader
      self.max_group_size = max_group_size
      self.max_separation = max_separation
      self.max_gt_options_product = max_gt_options_product
      self._metrics = deepvariant_pb2.LabelingMetrics()
  
imports: import collections
  import copy
  import enum
  import heapq
  import itertools
  from absl import logging
  from deepvariant.labeler import variant_labeler
  from deepvariant.protos import deepvariant_pb2
  from third_party.nucleus.io import fasta
  from third_party.nucleus.util import ranges
  from third_party.nucleus.util import variant_utils
  from third_party.nucleus.util import variantcall_utils
label_desc: Use image node_id 1 to create a new HaplotypeLabeler object from inherited base classes: variant_labeler with example: obj = HaplotypeLabeler(truth_vcf_reader, ref_reader, confident_regions, max_group_size, max_separation, max_gt_options_product)