code: def read_pgroups(in_file):
      
      out = {}
      with open(in_file) as in_handle:
          for line in (l for l in in_handle if not l.startswith("#")):
              locus, alleles, group = line.strip().split(";")
              for allele in alleles.split("/"):
                  out["HLA-%s%s" % (locus, allele)] = group
      return out
docs: Read HLAs and the pgroups they fall in.