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 version of variant with a hom-ref genotype.
  
  Args:
    variant: Our candidate third_party.nucleus.protos.Variant variant.
  
  Returns:
    A new Variant with the same position and alleles as variant but with a
    hom-ref genotype.
docstr_tok: ["Creates","a","version","of","variant","with","a","hom-ref","genotype",".","Args",":","variant",":","Our","candidate","third_party.nucleus.protos.Variant","variant",".","Returns",":","A","new","Variant","with","the","same","position","and","alleles","as","variant","but","with","a","hom-ref","genotype","."]
code: def _make_synthetic_hom_ref(self, variant):
      """Creates a version of variant with a hom-ref genotype.
  
      Args:
        variant: Our candidate third_party.nucleus.protos.Variant variant.
  
      Returns:
        A new Variant with the same position and alleles as variant but with a
        hom-ref genotype.
      """
      return variants_pb2.Variant(
          reference_name=variant.reference_name,
          start=variant.start,
          end=variant.end,
          reference_bases=variant.reference_bases,
          alternate_bases=variant.alternate_bases,
          calls=[variants_pb2.VariantCall(genotype=[0, 0])],
      )
  
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 4 for calling the PositionalVariantLabeler obj's underlying member method code with example usage: obj._make_synthetic_hom_ref(variant) and returns: variants_pb2