getBaseGapPenaltyCpp: Calculates gap penalty for dynamic programming based...

Description Usage Arguments Value Author(s) Examples

View source: R/RcppExports.R

Description

This function outputs base gap-penalty depending on SimType used. In case of getting base gap-penalty from similarity matrix distribution, gapQuantile will be used to pick the value.

Usage

1
getBaseGapPenaltyCpp(sim, SimType, gapQuantile = 0.5)

Arguments

sim

(matrix) A numeric matrix. Input similarity matrix.

SimType

(char) A character string. Similarity type must be selected from (dotProductMasked, dotProduct, cosineAngle, cosine2Angle, euclideanDist, covariance, correlation).

gapQuantile

(numeric) Must be between 0 and 1.

Value

baseGapPenalty (numeric).

Author(s)

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

Examples

1
2
3
sim <- matrix(c(-12, 1.0, 12, -2.3, -2, -2, 1.07, -2, 1.80, 2, 22, 42, -2, -1.5, -2, 10), 4, 4,
 byrow = FALSE)
getBaseGapPenaltyCpp(sim, "dotProductMasked", 0.5) # -0.25

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