Using dynamic programming and other algorithms to align sequences pairwise or by an MSA