nw.sg.mult: Semi-global Needleman-Wunsch for multiple sequenes.

Description Usage Arguments Value Examples

Description

Simple function using Rcpp to compute semi-global Needleman-Wunsch score. The first set of sequence are short, the second long.

Usage

1
2
3
nw.sg.mult(short, long, S, g)
nws.sg.mult(short, long, S, g)
qnw.sg.mult(short, long)

Arguments

short

short sequences (list of integer vectors).

long

long sequences (list of integer vectors).

S

a scoring matrix (nw.sg.mult) reshaped as vector or a short vector (nws.sg.mult) based on the scoring matrix (quicker) (see examples).

g

an integer vector holding the gap penalty.

Value

D

Matrix of scores from queries against satellites

D_scaled

Matrix of scores scaled by satellite lengths

Examples

1
2
3
4
5
short <- char2int(c("ACGT", "ACGG"))
long  <- char2int(c("AAACCCACGTATA", "ACGGGACGAGC"))
nw.sg.mult(short, long, matrix(c(1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1),4,4), -1)
nws.sg.mult(short, long, c(1,-1), -1)
qnw.sg.mult(short, long)

needleman.wunsch documentation built on May 2, 2019, 4:43 p.m.