class_docstr: Finds matching "truth" variants using a position-specific labeler.
  
  This is the original variant labeler from DeepVariant used up until v0.5,
  which assigns labels to variant calls by matching the chrom:position of a
  candidate variant with ones in truth, and then if one exists, assigns the
  label based on the genotype of the matched truth variant. This method works
  reasonably well but cannot handle complex representational differences between
  the candidate variants and the truth variants.
class_docstr_tok: ["Finds","matching","``","truth","''","variants","using","a","position-specific","labeler",".","This","is","the","original","variant","labeler","from","DeepVariant","used","up","until","v0.5",",","which","assigns","labels","to","variant","calls","by","matching","the","chrom",":","position","of","a","candidate","variant","with","ones","in","truth",",","and","then","if","one","exists",",","assigns","the","label","based","on","the","genotype","of","the","matched","truth","variant",".","This","method","works","reasonably","well","but","can","not","handle","complex","representational","differences","between","the","candidate","variants","and","the","truth","variants","."]
docstr: Creates a new VariantLabeler.
  
  Args:
    truth_vcf_reader: a VcfReader object that points to our truth variant set.
    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. If None, the confident regions
      constraint won't be enforced, and all variants will be included.
  
  Raises:
    ValueError: if vcf_reader is None.
docstr_tok: ["Creates","a","new","VariantLabeler",".","Args",":","truth_vcf_reader",":","a","VcfReader","object","that","points","to","our","truth","variant","set",".","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",".","If","None",",","the","confident","regions","constraint","wo","n't","be","enforced",",","and","all","variants","will","be","included",".","Raises",":","ValueError",":","if","vcf_reader","is","None","."]
code: def __init__(self, truth_vcf_reader, confident_regions=None):
      """Creates a new VariantLabeler.
  
      Args:
        truth_vcf_reader: a VcfReader object that points to our truth variant set.
        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. If None, the confident regions
          constraint won't be enforced, and all variants will be included.
  
      Raises:
        ValueError: if vcf_reader is None.
      """
      super(PositionalVariantLabeler, self).__init__(
          truth_vcf_reader=truth_vcf_reader,
          confident_regions=confident_regions,
      )
  
file_path: deepvariant/deepvariant/labeler/positional_labeler.py
imports: from absl import logging
  from third_party.nucleus.protos import variants_pb2
  from third_party.nucleus.util import variant_utils
  from third_party.nucleus.util import variantcall_utils
  from deepvariant.labeler import variant_labeler
label_desc: Use image node_id 1 to create a new PositionalVariantLabeler object from inherited base classes: variant_labeler with example: obj = PositionalVariantLabeler(truth_vcf_reader, confident_regions)