File: nwalign.Rd

package info (click to toggle)
r-bioc-dada2 1.34.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 3,016 kB
  • sloc: cpp: 3,096; makefile: 5
file content (58 lines) | stat: -rw-r--r-- 1,929 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/misc.R
\name{nwalign}
\alias{nwalign}
\title{Needleman-Wunsch alignment.}
\usage{
nwalign(
  s1,
  s2,
  match = getDadaOpt("MATCH"),
  mismatch = getDadaOpt("MISMATCH"),
  gap = getDadaOpt("GAP_PENALTY"),
  homo_gap = NULL,
  band = -1,
  endsfree = TRUE,
  vec = FALSE
)
}
\arguments{
\item{s1}{(Required). \code{character(1)}. The first sequence to align. A/C/G/T only.}

\item{s2}{(Required). \code{character(1)}. The second sequence to align. A/C/G/T only.}

\item{match}{(Optional). \code{numeric(1)}. Default is getDadaOpt("MATCH").
The score of a match in the alignment.}

\item{mismatch}{(Optional). \code{numeric(1)}. Default is getDadaOpt("MISMATCH").
The score of a mismatch in the alignment.}

\item{gap}{(Optional). \code{numeric(1)}. Default is getDadaOpt("GAP_PENALTY").
The alignment gap penalty. Should be negative.}

\item{homo_gap}{(Optional). \code{numeric(1)}. Default NULL (no special homopolymer penalty).
The alignment gap penalty within homopolymer regions. Should be negative.}

\item{band}{(Optional). \code{numeric(1)}.  Default -1 (no banding).
The Needleman-Wunsch alignment can be banded. This value specifies the radius of that band.
Set \code{band = -1} to turn off banding.}

\item{endsfree}{(Optional). \code{logical(1)}. Default TRUE.
Allow unpenalized gaps at the ends of the alignment.}

\item{vec}{(Optional). \code{logical(1)}. Default FALSE.
Use DADA2's vectorized aligner instead of standard DP matrix. Not intended for long sequences (>1kb).}
}
\value{
\code{character(2)}. The aligned sequences.
}
\description{
This function performs a Needleman-Wunsch alignment between two sequences.
}
\examples{
 sq1 <- "CTAATACATGCAAGTCGAGCGAGTCTGCCTTGAAGATCGGAGTGCTTGCACTCTGTGAAACAAGATA"
 sq2 <- "TTAACACATGCAAGTCGAACGGAAAGGCCAGTGCTTGCACTGGTACTCGAGTGGCGAACGGGTGAGT"
 nwalign(sq1, sq2)
 nwalign(sq1, sq2, band=16)

}