code: public AlignmentHelper getAlignmentHelper() {
          List<Boolean> matches = new ArrayList<>();
  
          IntArrayList pos1 = new IntArrayList(sequence1.size() + mutations.size()),
                  pos2 = new IntArrayList(sequence1.size() + mutations.size());
  
          StringBuilder sb1 = new StringBuilder(),
                  sb2 = new StringBuilder();
  
          Alphabet<S> alphabet = mutations.getAlphabet();
  
          AlignmentIteratorForward<S> iterator = forwardIterator();
          while (iterator.advance()) {
              final int mut = iterator.getCurrentMutation();
              switch (getRawTypeCode(mut)) {
                  case RAW_MUTATION_TYPE_SUBSTITUTION:
                      pos1.add(iterator.getSeq1Position());
                      pos2.add(iterator.getSeq2Position());
                      sb1.append(sequence1.symbolAt(iterator.getSeq1Position()));
                      sb2.append(Mutation.getToSymbol(mut, alphabet));
                      matches.add(false);
                      break;
  
                  case RAW_MUTATION_TYPE_DELETION:
                      pos1.add(iterator.getSeq1Position());
                      pos2.add(-1 - iterator.getSeq2Position());
                      sb1.append(sequence1.symbolAt(iterator.getSeq1Position()));
                      sb2.append("-");
                      matches.add(false);
                      break;
  
                  case RAW_MUTATION_TYPE_INSERTION:
                      pos1.add(-1 - iterator.getSeq1Position());
                      pos2.add(iterator.getSeq2Position());
                      sb1.append("-");
                      sb2.append(Mutation.getToSymbol(mut, alphabet));
                      matches.add(false);
                      break;
  
                  default:
                      pos1.add(iterator.getSeq1Position());
                      pos2.add(iterator.getSeq2Position());
                      char c = sequence1.symbolAt(iterator.getSeq1Position());
                      sb1.append(c);
                      sb2.append(c);
                      matches.add(true);
                      break;
              }
          }
  
          return new AlignmentHelper(sb1.toString(), sb2.toString(),
                  pos1.toArray(), pos2.toArray(),
                  new BitArray(matches));
      }
docs: Returns alignment helper to simplify alignment output in conventional (BLAST) form.
  
  @return alignment helper