Description Usage Arguments Details Value Note Author(s) References See Also Examples
The function can be used to compute similarity scores between strings.
1 |
x |
character vector, first string |
y |
character vector, second string |
global |
logical; global or local alignment |
match |
numeric, score for a match between symbols |
mismatch |
numeric, score for a mismatch between symbols |
gap |
numeric, penalty for inserting a gap |
minSim |
numeric, used as required minimum score in case of local alignments |
The function computes optimal alignment scores for global (Needleman-Wunsch) and local (Smith-Waterman) alignments with constant gap penalties.
Scoring and trace-back matrix are computed and saved in form of attributes
"ScoringMatrix"
and "TraceBackMatrix"
.
The characters in the trace-back matrix reflect insertion of a gap in
string y
(d
: deletion), match (m
), mismatch (mm
),
and insertion of a gap in string x
(i
). In addition stop
indicates that the minimum similarity score has been reached.
stringSim
returns an object of S3 class "stringSim"
inherited
from class "dist"
; cf. dist
.
The function is mainly for teaching purposes.
For distances between strings and string alignments see also Bioconductor package Biostrings.
Matthias Kohl Matthias.Kohl@stamats.de
R. Merkl and S. Waack (2009). Bioinformatik Interaktiv. Wiley.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.