parameters: (variant)
docstring: Gets the GenotypeType for variant.
  
    If variant doesn't have genotypes, returns no_call. Otherwise
    returns one of no_call, hom_ref, het, or hom_var depending on the
    status of the genotypes in the call field of variant.
  
    Args:
      variant: nucleus.genomics.v1.Variant.
  
    Returns:
      A GenotypeType.
  
    Raises:
      ValueError: If variant has more than one call (i.e., is multi-sample).
docstring_summary: Gets the GenotypeType for variant.
docstring_tokens: Gets the GenotypeType for variant .
function: def genotype_type(variant):
    """Gets the GenotypeType for variant.
  
    If variant doesn't have genotypes, returns no_call. Otherwise
    returns one of no_call, hom_ref, het, or hom_var depending on the
    status of the genotypes in the call field of variant.
  
    Args:
      variant: nucleus.genomics.v1.Variant.
  
    Returns:
      A GenotypeType.
  
    Raises:
      ValueError: If variant has more than one call (i.e., is multi-sample).
    """
    if not has_calls(variant):
      return GenotypeType.no_call
    elif len(variant.calls) > 1:
      raise ValueError('Unsupported: multiple genotypes found at', variant)
    else:
      gt = set(only_call(variant).genotype)
      if gt == {-1}:
        return GenotypeType.no_call
      elif gt == {0}:
        return GenotypeType.hom_ref
      elif len(gt) > 1:
        return GenotypeType.het
      else:
        return GenotypeType.hom_var
function_tokens: def genotype_type ( variant ) : if not has_calls ( variant ) : return GenotypeType . no_call elif len ( variant . calls ) > 1 : raise ValueError ( 'Unsupported: multiple genotypes found at' , variant ) else : gt = set ( only_call ( variant ) . genotype ) if gt == { - 1 } : return GenotypeType . no_call elif gt == { 0 } : return GenotypeType . hom_ref elif len ( gt ) > 1 : return GenotypeType . het else : return GenotypeType . hom_var