SequenceSimilarity {SynExtend} | R Documentation |
Takes in a DNAStringSet
or AAStringSet
representing a pairwise alignment and a subsitution matrix such as those present in PFASUM
, and return a numeric value representing sequence similarity as defined by the substitution matrix.
SequenceSimilarity(Seqs, SubMat, penalizeGapLetter = TRUE, includeTerminalGaps = TRUE, allowNegative = TRUE)
Seqs |
A |
SubMat |
A named matrix representing a substitution matrix. If left “NULL” and “Seqs” is a |
penalizeGapLetter |
A logical indicating whether or not to penalize Gap-Letter matches. Defaults to “TRUE”. |
includeTerminalGaps |
A logical indicating whether or not to penalize terminal matches. Defaults to “TRUE”. |
allowNegative |
A logical indicating whether or not allow negative scores. Defaults to “TRUE”. If “FALSE” scores that are returned as less than zero are converted to zero. |
Takes in a DNAStringSet
or AAStringSet
representing a pairwise alignment and a subsitution matrix such as those present in PFASUM
, and return a numeric value representing sequence similarity as defined by the substitution matrix.
Returns a single numeric.
Erik Wright ESWRIGHT@pitt.edu Nicholas Cooley npc19@pitt.edu
AlignSeqs
, AlignProfiles
, AlignTranslation
, DistanceMatrix
db <- system.file("extdata", "Bacteria_175seqs.sqlite", package="DECIPHER") dna <- SearchDB(db, remove="all") alignedDNA <- AlignSeqs(dna[1:2]) DNAPlaceholder <- diag(15) dimnames(DNAPlaceholder) <- list(DNA_ALPHABET[1:15], DNA_ALPHABET[1:15]) SequenceSimilarity(Seqs = alignedDNA, SubMat = DNAPlaceholder, includeTerminalGaps = TRUE, penalizeGapLetter = TRUE, allowNegative = TRUE)