Description Usage Arguments Value Examples
View source: R/Modstrings-sanitize.R
Since the one letter nomenclature for RNA and DNA modification differs depending on the source, a translation to a common alphabet is necessary.
sanitizeInput
exchanges based on a dictionary. The dictionary is
expected to be a DataFrame
with two columns, mods_abbrev
and
short_name
. Based on the short_name
the characters from in the
input are converted from values of mods_abbrev
into the the ones
from alphabet
.
Only different values will be searched for and exchanged.
sanitizeFromModomics
and sanitizeFromtRNAdb
use a predefined
dictionary, which is builtin.
1 2 3 4 5 | sanitizeInput(input, dictionary)
sanitizeFromModomics(input)
sanitizeFromtRNAdb(input)
|
input |
a |
dictionary |
a DataFrame containing at least two columns
|
the modified character
vector compatible for constructing a
ModString
object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # Modomics
chr <- "AGC@"
# Error since the @ is not in the alphabet
## Not run:
seq <- ModRNAString(chr)
## End(Not run)
seq <- ModRNAString(sanitizeFromModomics(chr))
# tRNAdb
chr <- "AGC+"
# No error but the + has a different meaning in the alphabet
## Not run:
seq <- ModRNAString(chr)
## End(Not run)
seq <- ModRNAString(sanitizeFromtRNAdb(chr))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.