getSeqSimMatCpp: Calculates similarity matrix for two sequences

View source: R/RcppExports.R

getSeqSimMatCppR Documentation

Calculates similarity matrix for two sequences

Description

Calculates similarity matrix for two sequences

Usage

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

# 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)

shubham1637/DIAlignR documentation built on March 29, 2023, 8:45 p.m.