class_docstr: An object that represents an individual's call at a genomic locus.
  
  Parameters
  ----------
  alleles : :obj:`list` of :obj:`int`
      List of alleles that compose the call.
  phased : :obj:`bool`
      If ``True``, the alleles are phased and the order is specified by
      `alleles`.
  
  Note
  ----
  This object refers to the Python value returned by taking or collecting
  Hail expressions, e.g. ``mt.GT.take(5`)``. This is rare; it is much
  more common to manipulate the :class:`.CallExpression` object, which is
  constructed using the following functions:
  
   - :func:`.call`
   - :func:`.unphased_diploid_gt_index_call`
   - :func:`.parse_call`
docstr: Returns a list containing the one-hot encoded representation of the
  called alleles.
  
  Examples
  --------
  
  >>> n_alleles = 2
  >>> hom_ref = hl.Call([0, 0])
  >>> het = hl.Call([0, 1])
  >>> hom_var = hl.Call([1, 1])
  
  >>> het.one_hot_alleles(n_alleles)
  [1, 1]
  
  >>> hom_var.one_hot_alleles(n_alleles)
  [0, 2]
  
  Notes
  -----
  This one-hot representation is the positional sum of the one-hot
  encoding for each called allele.  For a biallelic variant, the
  one-hot encoding for a reference allele is [1, 0] and the one-hot
  encoding for an alternate allele is [0, 1].
  
  Parameters
  ----------
  n_alleles : :obj:`int`
      Number of total alleles, including the reference.
  
  Returns
  -------
  :obj:`list` of :obj:`int`
docstr_tok: ["Returns","a","list","containing","the","one-hot","encoded","representation","of","the","called","alleles",".","Examples","--","--","--","--",">",">",">","n_alleles","=","2",">",">",">","hom_ref","=","hl.Call","(","[","0",",","0","]",")",">",">",">","het","=","hl.Call","(","[","0",",","1","]",")",">",">",">","hom_var","=","hl.Call","(","[","1",",","1","]",")",">",">",">","het.one_hot_alleles","(","n_alleles",")","[","1",",","1","]",">",">",">","hom_var.one_hot_alleles","(","n_alleles",")","[","0",",","2","]","Notes","--","--","-","This","one-hot","representation","is","the","positional","sum","of","the","one-hot","encoding","for","each","called","allele",".","For","a","biallelic","variant",",","the","one-hot","encoding","for","a","reference","allele","is","[","1",",","0","]","and","the","one-hot","encoding","for","an","alternate","allele","is","[","0",",","1","]",".","Parameters","--","--","--","--","--","n_alleles",":",":","obj",":","`","int","`","Number","of","total","alleles",",","including","the","reference",".","Returns","--","--","--","-",":","obj",":","`","list","`","of",":","obj",":","`","int","`"]
code: def one_hot_alleles(self, n_alleles):
      """Returns a list containing the one-hot encoded representation of the
      called alleles.
  
      Examples
      --------
  
      >>> n_alleles = 2
      >>> hom_ref = hl.Call([0, 0])
      >>> het = hl.Call([0, 1])
      >>> hom_var = hl.Call([1, 1])
  
      >>> het.one_hot_alleles(n_alleles)
      [1, 1]
  
      >>> hom_var.one_hot_alleles(n_alleles)
      [0, 2]
  
      Notes
      -----
      This one-hot representation is the positional sum of the one-hot
      encoding for each called allele.  For a biallelic variant, the
      one-hot encoding for a reference allele is [1, 0] and the one-hot
      encoding for an alternate allele is [0, 1].
  
      Parameters
      ----------
      n_alleles : :obj:`int`
          Number of total alleles, including the reference.
  
      Returns
      -------
      :obj:`list` of :obj:`int`
      """
      r = [0] * n_alleles
      for a in self._alleles:
          r[a] += 1
      return r
  
imports: from collections.abc import Sequence
  from hail.typecheck import typecheck_method
  from hail.utils import FatalError
label_desc: Use image node_id 19 for calling the Call obj's underlying member method code with example usage: obj.one_hot_alleles(n_alleles) and returns: r