align-utils | R Documentation |
A variety of different functions used to deal with sequence alignments.
nedit(x) # also nmatch and nmismatch
mismatchTable(x, shiftLeft=0L, shiftRight=0L, ...)
mismatchSummary(x, ...)
## S4 method for signature 'AlignedXStringSet0'
coverage(x, shift=0L, width=NULL, weight=1L)
## S4 method for signature 'PairwiseAlignmentsSingleSubject'
coverage(x, shift=0L, width=NULL, weight=1L)
compareStrings(pattern, subject)
## S4 method for signature 'PairwiseAlignmentsSingleSubject'
consensusMatrix(x,
as.prob=FALSE, shift=0L, width=NULL,
baseOnly=FALSE, gapCode="-", endgapCode="-")
x |
A |
shiftLeft , shiftRight |
Non-positive and non-negative integers respectively that specify how many preceding and succeeding characters to and from the mismatch position to include in the mismatch substrings. |
... |
Further arguments to be passed to or from other methods. |
shift , width |
See |
weight |
An integer vector specifying how much each element in |
pattern , subject |
The strings to compare. Can be of type If the first argument of |
as.prob |
If |
baseOnly |
|
gapCode , endgapCode |
The codes in the appropriate |
mismatchTable
: a data.frame containing the positions and substrings
of the mismatches for the AlignedXStringSet
or
PairwiseAlignments
object.
mismatchSummary
: a list of data.frame objects containing counts and
frequencies of the mismatches for the AlignedXStringSet
or
PairwiseAlignmentsSingleSubject
object.
compareStrings
combines two equal-length strings that are assumed to be
aligned into a single character string containing that replaces mismatches
with "?"
, insertions with "+"
, and deletions with "-"
.
pairwiseAlignment
,
consensusMatrix
,
XString-class, XStringSet-class, XStringViews-class,
AlignedXStringSet-class, PairwiseAlignments-class,
match-utils
## Compare two globally aligned strings
string1 <- "ACTTCACCAGCTCCCTGGCGGTAAGTTGATC---AAAGG---AAACGCAAAGTTTTCAAG"
string2 <- "GTTTCACTACTTCCTTTCGGGTAAGTAAATATATAAATATATAAAAATATAATTTTCATC"
compareStrings(string1, string2)
## Create a consensus matrix
nw1 <-
pairwiseAlignment(AAStringSet(c("HLDNLKGTF", "HVDDMPNAL")), AAString("SMDDTEKMSMKL"),
substitutionMatrix = "BLOSUM50", gapOpening = 3, gapExtension = 1)
consensusMatrix(nw1)
## Examine the consensus between the bacteriophage phi X174 genomes
data(phiX174Phage)
phageConsmat <- consensusMatrix(phiX174Phage, baseOnly = TRUE)
phageDiffs <- which(apply(phageConsmat, 2, max) < length(phiX174Phage))
phageDiffs
phageConsmat[,phageDiffs]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.