I'm interested in learning more about DNA sequence alignment and have been reading up on the topic online.
I'm more interested in the Smith-Waterman algorithm for local alignment, but I'm quite confused about how the algorithm works.
I know the algorithm works on a MxN matrix, where M and N are the lengths of the 2 DNA sequences, but I'm not sure how the entries of the matrix came about. Also, I keep coming across the substitution matrices PAM and BLOSUM, but I thought they're mostly used for amino acid sequences and their matrix entries are predetermined. So how do they fit into the Smith-Waterman algorithm where the DNA sequences are different in different comparisons?