R/Modstrings-letterFrequency.R
letterFrequency.Rd
These functions follow the same principle as the
Biostrings
functions. Please be
aware, that the matices can become quite large, since the alphabet of
ModString
objects contains more letters.
# S4 method for ModDNAString
hasOnlyBaseLetters(x)
# S4 method for ModRNAString
hasOnlyBaseLetters(x)
# S4 method for ModDNAString
alphabetFrequency(x, as.prob = FALSE, baseOnly = FALSE)
# S4 method for ModRNAString
alphabetFrequency(x, as.prob = FALSE, baseOnly = FALSE)
# S4 method for ModDNAStringSet
alphabetFrequency(x, as.prob = FALSE, collapse = FALSE, baseOnly = FALSE)
# S4 method for ModRNAStringSet
alphabetFrequency(x, as.prob = FALSE, collapse = FALSE, baseOnly = FALSE)
# S4 method for MaskedModString
alphabetFrequency(x, as.prob = FALSE, ...)
# S4 method for ModStringViews
letterFrequency(x, letters, OR = "|", as.prob = FALSE, ...)
# S4 method for MaskedModString
letterFrequency(x, letters, OR = "|", as.prob = FALSE)
# S4 method for ModStringSet
consensusMatrix(x, as.prob = FALSE, shift = 0L, width = NULL, baseOnly = FALSE)
# S4 method for ModDNAStringSet
consensusString(x, threshold = 0.25, shift = 0L, width = NULL)
# S4 method for ModRNAStringSet
consensusString(x, threshold = 0.25, shift = 0L, width = NULL)
# S4 method for ModStringViews
consensusString(x, threshold, shift = 0L, width = NULL)
a ModString
, a ModStringSet
,
a ModStringViews
or a MaskedModString
object.
TRUE
or FALSE
(default): Should the result be
returned as probabilities instead of counts? (sum per column = 1
)
TRUE
or FALSE
(default): Should the result omit
occurances of the letters N.-+
?
TRUE
or FALSE
(default): Should the results
summed up all elements for ModStringSet
or ModStringViews
objects or reported per element.
See letterFrequency
.
See letterFrequency
.
See letterFrequency
.
See letterFrequency
.
See letterFrequency
.
Since the amiguityMap is fixed to "?"
for
ModString
objects, only the treshold can be set (default
threshold = 0.25
)
a matrix with the results (letter x pos).
mod <- ModDNAString(paste(alphabet(ModDNAString()), collapse = ""))
mod
#> 55-letter ModDNAString object
#> seq: ACGTN-+.pδO]DJeg`bU∝πI763218∉⊆⊇Rαmh×f4νX'κo()ηa⇓⇑"√/≡ζ~
hasOnlyBaseLetters(mod)
#> [1] FALSE
alphabetFrequency(mod)
#> A C G T N - + . p δ O ] D J e g ` b U ∝ π I 7 6 3 2 1 8 ∉ ⊆ ⊇ R α m h × f 4 ν X
#> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
#> ' κ o ( ) η a ⇓ ⇑ " √ / ≡ ζ ~
#> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1