Hamming distance after Needlman-Wunsch alignment.
This function performs a Needleman-Wunsch alignment between two sequences, and then counts the number of mismatches and indels in that alignment. End gaps are not included in this count.
nwhamming(s1, s2, ...)
s1 |
(Required). |
s2 |
(Required). |
... |
(Optional). Further arguments to pass on to |
integer(1)
. The total number of mismatches and gaps, excluding gaps at the beginning
and end of the alignment.
sq1 <- "CTAATACATGCAAGTCGAGCGAGTCTGCCTTGAAGATCGGAGTGCTTGCACTCTGTGAAACAAGATA" sq2 <- "TTAACACATGCAAGTCGAACGGAAAGGCCAGTGCTTGCACTGGTACTCGAGTGGCGAACGGGTGAGT" nwhamming(sq1, sq2) nwhamming(sq1, sq2, band=16)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.