code: protected final Allele loadAllele(final String glstring, final String accession) throws IOException {
          final String id = glstringResolver.resolveAllele(glstring);
          Allele allele = idResolver.findAllele(id);
          if (allele == null) {
              Matcher m = ALLELE_PATTERN.matcher(glstring);
              if (m.matches()) {
                  String locusPart = m.group(1);
                  Locus locus = loadLocus(locusPart);
                  allele = new Allele(id, accession, glstring, locus);
                  glRegistry.registerAllele(allele);
              }
              else {
                  throw new IOException("allele \"" + glstring + "\" not a valid formatted glstring");
              }
          }
          return allele;
      }
docs: Load and register the specified allele in GL String format.
  
  @param glstring allele in GL String format, must not be null or empty
  @param accession allele accession, must not be null
  @return the registered allele
  @throws IOException if an I/O error occurs