nwhamming: Hamming distance after Needlman-Wunsch alignment.

Description Usage Arguments Value Examples

Description

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.

Usage

1
nwhamming(s1, s2, ...)

Arguments

s1

(Required). character(1). The first sequence to align. A/C/G/T only.

s2

(Required). character(1). The second sequence to align. A/C/G/T only.

...

(Optional). Further arguments to pass on to nwalign.

Value

integer(1). The total number of mismatches and gaps, excluding gaps at the beginning and end of the alignment.

Examples

1
2
3
4
 sq1 <- "CTAATACATGCAAGTCGAGCGAGTCTGCCTTGAAGATCGGAGTGCTTGCACTCTGTGAAACAAGATA"
 sq2 <- "TTAACACATGCAAGTCGAACGGAAAGGCCAGTGCTTGCACTGGTACTCGAGTGGCGAACGGGTGAGT"
nwhamming(sq1, sq2)
nwhamming(sq1, sq2, band=16)

dada2 documentation built on Nov. 8, 2020, 6:48 p.m.