code: public static <S extends Sequence<C>, C extends Compound> PairwiseSequenceAligner<S, C> getPairwiseAligner(
  			S query, S target, PairwiseSequenceAlignerType type, GapPenalty gapPenalty,
  			SubstitutionMatrix<C> subMatrix) {
  		if (!query.getCompoundSet().equals(target.getCompoundSet())) {
  			throw new IllegalArgumentException("Sequence compound sets must be the same");
  		}
  		switch (type) {
  		default:
  		case GLOBAL:
  			return new NeedlemanWunsch<S, C>(query, target, gapPenalty, subMatrix);
  		case LOCAL:
  			return new SmithWaterman<S, C>(query, target, gapPenalty, subMatrix);
  		case GLOBAL_LINEAR_SPACE:
  		case LOCAL_LINEAR_SPACE:
  			// TODO other alignment options (Myers-Miller, Thompson)
  			throw new UnsupportedOperationException(Alignments.class.getSimpleName() + " does not yet support " +
  					type + " alignment");
  		}
  	}
docs: Factory method which constructs a pairwise sequence aligner.
  
  @param <S> each {@link Sequence} of an alignment pair is of type S
  @param <C> each element of an {@link AlignedSequence} is a {@link Compound} of type C
  @param query the first {@link Sequence} to align
  @param target the second {@link Sequence} to align
  @param type chosen type from list of pairwise sequence alignment routines
  @param gapPenalty the gap penalties used during alignment
  @param subMatrix the set of substitution scores used during alignment
  @return pairwise sequence aligner