class_docstr: BaseClass for variant callers.
class_docstr_tok: ["BaseClass","for","variant","callers","."]
docstr: Gets variant calls and gvcf records for all sites in allele_counter.
  
  Args:
    allele_counters: Dictionary of AlleleCounter objects keyed by sample IDs
      holding the allele counts we will use to find candidate variants and
      create gvcf records.
    target_sample: string. Sample ID of sample for which variants are called.
    include_gvcfs: boolean. If True, we will compute gVCF records for all of
      the AlleleCounts in AlleleCounter.
    include_med_dp: boolean. If True, in the gVCF records, we will include
      MED_DP.
    left_padding: int. Left padding that is added to the region and needs to
      be discarded for candidates and gvcf calculation.
    right_padding: int. Right padding that is added to the region and needs to
      be discarded for candidates and gvcf calculation.
  
  Returns:
    Two values. The first is a list of DeepVariantCall protos containing our
    candidate variants. The second is a list of gVCF blocks in Variant proto
    format, if include_gvcfs is True. If False, an empty list is returned.
docstr_tok: ["Gets","variant","calls","and","gvcf","records","for","all","sites","in","allele_counter",".","Args",":","allele_counters",":","Dictionary","of","AlleleCounter","objects","keyed","by","sample","IDs","holding","the","allele","counts","we","will","use","to","find","candidate","variants","and","create","gvcf","records",".","target_sample",":","string",".","Sample","ID","of","sample","for","which","variants","are","called",".","include_gvcfs",":","boolean",".","If","True",",","we","will","compute","gVCF","records","for","all","of","the","AlleleCounts","in","AlleleCounter",".","include_med_dp",":","boolean",".","If","True",",","in","the","gVCF","records",",","we","will","include","MED_DP",".","left_padding",":","int",".","Left","padding","that","is","added","to","the","region","and","needs","to","be","discarded","for","candidates","and","gvcf","calculation",".","right_padding",":","int",".","Right","padding","that","is","added","to","the","region","and","needs","to","be","discarded","for","candidates","and","gvcf","calculation",".","Returns",":","Two","values",".","The","first","is","a","list","of","DeepVariantCall","protos","containing","our","candidate","variants",".","The","second","is","a","list","of","gVCF","blocks","in","Variant","proto","format",",","if","include_gvcfs","is","True",".","If","False",",","an","empty","list","is","returned","."]
code: def calls_and_gvcfs(
      self,
      allele_counters: Dict[str, allelecounter.AlleleCounter],
      target_sample: str,
      include_gvcfs: bool = False,
      include_med_dp: bool = False,
      left_padding: int = 0,
      right_padding: int = 0,
  ) -> Tuple[
      Sequence[deepvariant_pb2.DeepVariantCall],
      Sequence[variants_pb2.Variant],
  ]:
      """Gets variant calls and gvcf records for all sites in allele_counter.
  
      Args:
        allele_counters: Dictionary of AlleleCounter objects keyed by sample IDs
          holding the allele counts we will use to find candidate variants and
          create gvcf records.
        target_sample: string. Sample ID of sample for which variants are called.
        include_gvcfs: boolean. If True, we will compute gVCF records for all of
          the AlleleCounts in AlleleCounter.
        include_med_dp: boolean. If True, in the gVCF records, we will include
          MED_DP.
        left_padding: int. Left padding that is added to the region and needs to
          be discarded for candidates and gvcf calculation.
        right_padding: int. Right padding that is added to the region and needs to
          be discarded for candidates and gvcf calculation.
  
      Returns:
        Two values. The first is a list of DeepVariantCall protos containing our
        candidate variants. The second is a list of gVCF blocks in Variant proto
        format, if include_gvcfs is True. If False, an empty list is returned.
      """
  
      # TODO Consider passing left and right padding to get_candidates so
      # that we didn't waiste runtime on calculating candidates beoynd the region.
      candidates = self.get_candidates(
          allele_counters=allele_counters, sample_name=target_sample
      )
  
      gvcfs = []
      if include_gvcfs:
          gvcfs = list(
              self.make_gvcfs(
                  allele_counters[target_sample].summary_counts(
                      left_padding, right_padding
                  ),
                  include_med_dp=include_med_dp,
              )
          )
      return candidates, gvcfs
  
imports: import abc
  import collections
  import itertools
  import math
  import operator
  import statistics
  from typing import Dict, Sequence, Tuple
  import numpy
  from deepvariant.protos import deepvariant_pb2
  from deepvariant.python import allelecounter
  from deepvariant.python import variant_calling
  from deepvariant.python import variant_calling_multisample
  from third_party.nucleus.protos import variants_pb2
  from third_party.nucleus.util import genomics_math
  from third_party.nucleus.util import variantcall_utils
  from third_party.nucleus.util import vcf_constants
label_desc: Use image node_id 5 for calling the VariantCaller obj's underlying member method code with example usage: obj.calls_and_gvcfs(allele_counters, target_sample, include_gvcfs, include_med_dp, left_padding, right_padding) and returns: candidates,  gvcfs