Description Usage Arguments Value Examples
Compute shannon information based on position and treatment
1 2 3 4 5 6 7 8 9 | calcInformation(
dframe,
pos,
elems,
trt = NULL,
weight = NULL,
k = 4,
method = "shannon"
)
|
dframe |
data frame of peptide (or any other) sequences and some treatment factors |
pos |
variable containing position |
elems |
variable containing elements |
trt |
(vector of) character string(s) of treatment information |
weight |
variable containing number of times each sequence is observed, defaults to 1 in case no weight is given |
k |
alphabet size: 4 for DNA/RNA sequences, 21 for standard amino acids |
method |
either "shannon" or "frequency" for Shannon information or relative frequency of element by position. |
extended data frame with additional information of shannon info in bits and each elements contribution to the total information
1 2 3 4 5 6 | data(sequences)
dm2 <- splitSequence(sequences, peptide)
dm3 <- calcInformation(dm2, pos = position, elems = element, trt = class, k = 21)
# precursor to a logo plot:
library(ggplot2)
# library(biovizBase)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.