code: public Mutations<S> invert() {
          if (mutations.length == 0)
              return this;
  
          int[] newMutations = new int[mutations.length];
          int delta = 0;
          for (int i = 0; i < mutations.length; i++) {
              int from = getFrom(mutations[i]);
              int to = getTo(mutations[i]);
              int pos = getPosition(mutations[i]);
              int type = getRawTypeCode(mutations[i]);
              switch (type) {
                  case RAW_MUTATION_TYPE_DELETION:
                      delta--;
                      type = RAW_MUTATION_TYPE_INSERTION;
                      pos++;
                      break;
                  case RAW_MUTATION_TYPE_INSERTION:
                      delta++;
                      type = RAW_MUTATION_TYPE_DELETION;
                      pos--;
                      break;
                  default:
                      break;
              }
              newMutations[i] = createMutation(type, pos + delta, to, from);
          }
          return new Mutations<>(alphabet, newMutations, true);
      }
docs: Inverts mutations, so that they reflect difference from seq2 to seq1. <p/> E.g. for mutations generated with
  <pre>
  NucleotideSequence ref = randomSequence(300);
  int[] mutations = Mutations.generateMutations(ref,
  MutationModels.getEmpiricalNucleotideMutationModel()
  .multiply(3.0));
  </pre>
  and the inverted mutations
  <pre>
  int[] invMutations = ConsensusAligner.invertMutations(mutations);
  </pre>
  The following two methods are equal
  <pre>
  Mutations.printAlignment(ref, mutations);
  Mutations.printAlignment(Mutations.mutate(ref, mutations), invMutations);
  </pre>
  Same stands for
  <pre>
  Mutations.getPosition(mutations, posInSeq1)
  </pre>
  
  @return mutations that will generate seq1 from seq2