getSeqSimMatCpp: Calculates similarity matrix for two sequences

Description Usage Arguments Value Author(s) Examples

View source: R/RcppExports.R

Description

Calculates similarity matrix for two sequences

Usage

1
getSeqSimMatCpp(seq1, seq2, match, misMatch)

Arguments

seq1

(char) A single string.

seq2

(char) A single string.

match

(double) Score for character match.

misMatch

(double) score for character mismatch.

Value

s (matrix) Numeric similarity matrix. Rows and columns expresses seq1 and seq2, respectively.

Author(s)

Shubham Gupta, shubh.gupta@mail.utoronto.ca ORCID: 0000-0003-3500-8152 License: (c) Author (2019) + MIT Date: 2019-03-05

Examples

1
2
3
4
5
6
# Get sequence similarity of two DNA strings
Match=10; MisMatch=-2
seq1 = "GCAT"; seq2 = "CAGTG"
getSeqSimMatCpp(seq1, seq2, Match, MisMatch)
matrix(c(-2, 10, -2, -2, -2, -2, 10, -2, 10, -2, -2, -2, -2, -2, -2, 10, 10, -2, -2, -2),
 4, 5, byrow = FALSE)

DIAlignR documentation built on Nov. 8, 2020, 8:22 p.m.