class_docstr: BaseClass for systems that want to provide training labels for examples.
  
  A VariantLabeler provides methods to assign a genotype label to each of a
  series of candidate variants using data from a truth set of variants
  accessible with vcf_reader and an optional RangeSet of confident regions.
  
  The basic logic of this class is something like:
  
  candidates = [third_party.nucleus.protos.Variant(...), ...]
  labeler = ConcreteSubclassOfVariantLabeler(vcf_reader, confident_regions)
  for label in labeler.label_variants(candidates):
    if label.is_confident:
      for i in range(len(label.variant.alternate_bases)
        genotype_label_value = label.label_for_alt_alleles([i])
  
  See the docs on each individual function to get a better understanding of what
  each function does and the meaning of the return values.
class_docstr_tok: ["BaseClass","for","systems","that","want","to","provide","training","labels","for","examples",".","A","VariantLabeler","provides","methods","to","assign","a","genotype","label","to","each","of","a","series","of","candidate","variants","using","data","from","a","truth","set","of","variants","accessible","with","vcf_reader","and","an","optional","RangeSet","of","confident","regions",".","The","basic","logic","of","this","class","is","something","like",":","candidates","=","[","third_party.nucleus.protos.Variant","(","...",")",",","...","]","labeler","=","ConcreteSubclassOfVariantLabeler","(","vcf_reader",",","confident_regions",")","for","label","in","labeler.label_variants","(","candidates",")",":","if","label.is_confident",":","for","i","in","range","(","len","(","label.variant.alternate_bases",")","genotype_label_value","=","label.label_for_alt_alleles","(","[","i","]",")","See","the","docs","on","each","individual","function","to","get","a","better","understanding","of","what","each","function","does","and","the","meaning","of","the","return","values","."]
code: def __init__(self, truth_vcf_reader, confident_regions=None):
      if truth_vcf_reader is None:
          raise ValueError("truth_vcf_reader cannot be None")
      if confident_regions is None:
          logging.warning(
              "Note: confident_regions for VariantLabeler is None. "
              "It is possible that this is not allowed for some "
              "subtype of VariantLabelers."
          )
      self._truth_vcf_reader = truth_vcf_reader
      self._confident_regions = confident_regions
  
file_path: deepvariant/deepvariant/labeler/variant_labeler.py
imports: import abc
  from absl import logging
  from third_party.nucleus.util import variant_utils
  from third_party.nucleus.util import variantcall_utils
  from deepvariant import dv_utils
label_desc: Use image node_id 1 to create a new VariantLabeler object from inherited base classes: object with example: obj = VariantLabeler(truth_vcf_reader, confident_regions)