replaceLetterAt | R Documentation |
replaceLetterAt
replaces a letter in a ModString
objects
with a new letter. In contrast to modifyNucleotides
it does not
check the letter to be replaced for its identity, it just replaces it and
behaves exactly like the
## S4 method for signature 'ModString'
replaceLetterAt(x, at, letter, verbose = FALSE)
## S4 method for signature 'ModStringSet'
replaceLetterAt(x, at, letter, verbose = FALSE)
x |
a |
at |
the location where the replacement should be made. The same input as in If x is a If x is a rectangular |
letter |
The new letters. The same input as in If x is a If x is a rectangular |
verbose |
See |
the input ModString
or ModStringSet
object with the changes applied
# Replacing the last two letters in a ModDNAString
seq1 <- ModDNAString("AGTC")
seq
seq2 <- replaceLetterAt(seq1,c(3,4),"CT")
seq2
# Now containg and m3C
seq2 <- replaceLetterAt(seq1,c(3,4),ModDNAString("/T"))
seq2
# Replacing the last two letters in a set of sequences
set1 <- ModDNAStringSet(c("AGTC","AGTC"))
set1
set2 <- replaceLetterAt(set1,
matrix(rep(c(FALSE,FALSE,TRUE,TRUE),2),
nrow = 2,
byrow = TRUE),
c("CT","CT"))
set2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.