parameters: (variant, chrom, param)
return_statement: return score
docstring: Calculate denovo score for allosomal variants in a male proband
docstring_summary: Calculate denovo score for allosomal variants in a male proband
docstring_tokens: Calculate denovo score for allosomal variants in a male proband
function: def calculate_dng_DQ_male_allosome(variant, chrom, param):
      """Calculate denovo score for allosomal variants in a male proband"""
  
      if variant.is_snp and not can_compute_dng_DQ_snv(variant, param):
          return None
  
      if variant.is_indel and not can_compute_dng_DQ_indel(variant, param):
          return None
  
      # Only compare to the one parent from which the allosome can originate
      parent_id = 1 if chrom == 'X' else 2  # compare: mother(1)<>X, father(2)<>Y
      if not can_compute_dng_DQ_male_allosome(variant, param, parent_id):
          return None
  
      # genotypes for proband and relevant parent
      gts = variant.genotypes
      gt_proband = set(gts[param['sample_index'][0]][:-1])
      gt_parent = set(gts[param['sample_index'][parent_id]][:-1])
  
      if gt_proband.isdisjoint(gt_parent):
          score = _max_score
      else:
          score = 0.0
  
      return score
function_tokens: def calculate_dng_DQ_male_allosome ( variant , chrom , param ) : if variant . is_snp and not can_compute_dng_DQ_snv ( variant , param ) : return None if variant . is_indel and not can_compute_dng_DQ_indel ( variant , param ) : return None # Only compare to the one parent from which the allosome can originate parent_id = 1 if chrom == 'X' else 2 # compare: mother(1)<>X, father(2)<>Y if not can_compute_dng_DQ_male_allosome ( variant , param , parent_id ) : return None # genotypes for proband and relevant parent gts = variant . genotypes gt_proband = set ( gts [ param [ 'sample_index' ] [ 0 ] ] [ : - 1 ] ) gt_parent = set ( gts [ param [ 'sample_index' ] [ parent_id ] ] [ : - 1 ] ) if gt_proband . isdisjoint ( gt_parent ) : score = _max_score else : score = 0.0 return score