docs: def _process_all_allele_view(self, limit):
          """
          Add the allele as a variant locus (or reference locus if wild-type).
          If the marker is specified, we add the link to the marker.
          We assume that the MGI ids are available in the idhash,
          added in all_summary_view.
          We add the sequence alteration as a BNode here, if there is a marker.
          Otherwise, the allele itself is a sequence alteration.
  
          Triples:
          <MGI:allele_id> a GENO:variant_locus
              OR GENO:reference_locus
              OR GENO:sequence_alteration   IF no marker_id specified.
  
              [GENO:has_variant_part OR GENO:has_reference_part] <MGI:marker_id>
              GENO:derived_from <MGI:strain_id>
              GENO:has_variant_part <_seq_alt_id>
          <_seq_alt_id> a GENO:sequence_alteration
              derives_from <strain_id>
  
          :param limit:
          :return:
  
          """
          # transmission_key -> inheritance? Need to locate related table.
          if self.test_mode:
              graph = self.testgraph
          else:
              graph = self.graph
          model = Model(graph)
          geno = Genotype(graph)
          line_counter = 0
          LOG.info(
              "adding alleles, mapping to markers, " +
              "extracting their sequence alterations " +
              "from all_allele_view")
          raw = '/'.join((self.rawdir, 'all_allele_view'))
          with open(raw, 'r') as f:
              col_count = f.readline().count('\t')  # read the header row; skip
              for line in f:
                  line = line.rstrip("\n")
                  line_counter += 1
                  cols = line.count('\t')
                  # bail if the row is malformed
                  if cols != col_count:
                      LOG.warning('Expected ' + str(col_count) + ' columns.')
                      LOG.warning('Received ' + str(cols) + ' columns.')
                      LOG.warning(line.format())
                      continue
  
                  (allele_key, marker_key, strain_key, symbol,
                   name, iswildtype) = line.split('\t')
  
                  # TODO update processing to use this view better
                  # including jnums!
  
                  if self.test_mode is True:
                      if int(allele_key) not in self.test_keys.get('allele'):
                          continue
  
                  allele_id = self.idhash['allele'].get(allele_key)
                  if allele_id is None:
                      LOG.error(
                          "what to do! can't find allele_id. skipping %s %s",
                          allele_key, symbol)
                      continue
  
                  marker_id = None
  
                  if marker_key is not None and marker_key != '':
                      # we make the assumption here that the markers
                      # have already been added to the table
                      marker_id = self.idhash['marker'].get(marker_key)
                      if marker_id is None:
                          LOG.error(
                              "what to do! can't find marker_id. skipping %s %s",
                              marker_key, symbol)
                          continue
  
                  iseqalt_id = self._makeInternalIdentifier('seqalt', allele_key)
  
                  # for non-wild type alleles:
                  if iswildtype == '0':
                      locus_type = self.globaltt['variant_locus']
                      locus_rel = self.globaltt['is_allele_of']
                  # for wild type alleles:
                  elif iswildtype == '1':
                      locus_type = self.globaltt['reference_locus']
                      locus_rel = self.globaltt['is_reference_allele_of']
                      # add the allele to the wildtype set for lookup later
                      self.wildtype_alleles.add(allele_id)
                  else:
                      locus_rel = None
                      locus_type = None
  
                  model.addIndividualToGraph(allele_id, symbol, locus_type)
                  model.makeLeader(allele_id)
                  self.label_hash[allele_id] = symbol
                  self.idhash['seqalt'][allele_key] = iseqalt_id
  
                  # HACK - if the label of the allele == marker,
                  # then make the thing a seq alt
                  allele_label = self.label_hash.get(allele_id)
                  marker_label = self.label_hash.get(marker_id)
                  if allele_label is not None and allele_label == marker_label:
                      model.addSameIndividual(allele_id, marker_id)
                      self.idhash['seqalt'][allele_key] = allele_id
                      model.addComment(
                          allele_id,
                          self._makeInternalIdentifier('allele', allele_key))
                  elif marker_id is not None:
                      # marker_id will be none if the allele
                      # is not linked to a marker
                      # (as in, it's not mapped to a locus)
                      geno.addAlleleOfGene(allele_id, marker_id, locus_rel)
  
                  # sequence alteration in strain
  
                  if iswildtype == '0':
                      sa_label = symbol
                      sa_id = iseqalt_id
  
                      if marker_key is not None \
                              and allele_label != marker_label and marker_key != '':
                          # sequence alteration has label reformatted(symbol)
                          if re.match(r".*<.*>.*", symbol):
                              sa_label = re.sub(r".*<", "<", symbol)
                          elif re.match(r"\+", symbol):
                              # TODO: Check to see if this is the proper handling
                              # as while symbol is just +,
                              # marker symbol has entries without any <+>.
                              sa_label = '<+>'
                          geno.addSequenceAlterationToVariantLocus(iseqalt_id,
                                                                   allele_id)
                      else:
                          # make the sequence alteration == allele
                          sa_id = allele_id
  
                      # else this will end up adding the non-located transgenes
                      # as sequence alterations also removing the < and > from sa
                      sa_label = re.sub(r'[\<\>]', '', sa_label)
  
                      # gu.addIndividualToGraph(graph,sa_id,sa_label,None,name)
                      geno.addSequenceAlteration(sa_id, sa_label, None, name)
                      self.label_hash[sa_id] = sa_label
  
                      strain_id = self.idhash['strain'].get(strain_key)
                      # scrub out if the strain is "not specified"
                      if strain_id is not None and \
                              strain_id not in ['MGI:4867032', 'MGI:5649511']:
                          geno.addSequenceDerivesFrom(allele_id, strain_id)
  
                  if not self.test_mode and limit is not None and line_counter > limit:
                      break
  
          return