doAffineAlignmentCpp | R Documentation |
Perform affine global and overlap alignment on a similarity matrix
doAffineAlignmentCpp(sim, go, ge, OverlapAlignment)
sim |
(NumericMatrix) A numeric matrix with similarity values of two sequences or signals. |
go |
(numeric) Penalty for introducing first gap in alignment. |
ge |
(numeric) Penalty for introducing subsequent gaps in alignment. |
OverlapAlignment |
(logical) An input for alignment with free end-gaps. False: Global alignment, True: overlap alignment. |
affineAlignObj (S4class) An object from C++ class of AffineAlignObj.
Shubham Gupta, shubh.gupta@mail.utoronto.ca ORCID: 0000-0003-3500-8152 License: (c) Author (2019) + MIT Date: 2019-03-08
# Get sequence similarity of two DNA strings
Match=10; MisMatch=-2
seq1 = "GCAT"; seq2 = "CAGTG"
s <- getSeqSimMatCpp(seq1, seq2, Match, MisMatch)
objAffine_Global <- doAffineAlignmentCpp(s, 22, 7, FALSE)
slot(objAffine_Global, "score") # -2 -4 -6 4 -18
objAffine_Olap <- doAffineAlignmentCpp(s, 22, 7, TRUE)
slot(objAffine_Olap, "score") # 0 10 20 18 18 18
Match=10; MisMatch=-2
seq1 = "CAT"; seq2 = "CAGTG"
s <- getSeqSimMatCpp(seq1, seq2, Match, MisMatch)
objAffine_Global <- doAffineAlignmentCpp(s, 22, 7, FALSE)
slot(objAffine_Global, "score") # 10 20 -2 -9 -11
objAffine_Olap <- doAffineAlignmentCpp(s, 22, 7, TRUE)
slot(objAffine_Olap, "score") # 10 20 18 18 18
Match=10; MisMatch=-2
seq1 = "CA"; seq2 = "AG"
s <- getSeqSimMatCpp(seq1, seq2, Match, MisMatch)
objAffine_Global <- doAffineAlignmentCpp(s, 22, 7, FALSE)
slot(objAffine_Global, "simScore_forw") # -4
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.