code: def encode_genotype(s, mindepth=3, depth_index=2, nohet=False):
      
      atoms = s.split(":")
      if len(atoms) < 3:
          return g2x[atoms[0]]
  
      inferred = atoms[0]
      depth = int(atoms[depth_index])
      if depth < mindepth:
          return '-'
      if inferred == '0/0':
          return 'A'
      if inferred == '0/1':
          return '-' if nohet else 'X'
      if inferred == '1/1':
          return 'B'
      return '-'
docs: >>> encode_genotype("1/1:128,18,0:6:18")  # homozygote B
      'B'
      >>> encode_genotype("0/1:0,0,0:0:3")      # missing data
      '-'
      >>> encode_genotype("0/1:128,0,26:7:22")  # heterozygous A/B
      'X'