Description Usage Arguments Details Value Author(s) See Also Examples
Creates a new DLData
object from a set of input sequences.
1 2 3 4 5 6 7 8 9 |
sequences |
the input sequences, may be provided as i) |
weights |
weights associated with the sequences, numeric vector of the
same length as |
symbols |
the symbols (alphabet) over which the sequences are defined |
colors |
colors for each of the |
delim |
delimiter between the symbols in the input sequences, ignored if
|
sortByWeights |
if |
axis.labels |
the labels of the individual sequence positions;
if |
Sequences may either be provided as a character
vector or as a
data.frame
. All symbols occurring in these sequences need to be
defined and assigned to colors, which are used for plotting later. Colors do
not need to be unique, but symbols with identical colors may become
indistinguishable in subsequent plots (which might even be desired, for
instance, when visualizing protein properties instead of amino acids).
Sequences may have an associated weight, which is used to order sequences,
e.g., for creating chunks/blocks of sequences in subsequent plots (see
chunks
parameter of plotDeplogo
).
the DLData
object
Jan Grau <grau@informatik.uni-halle.de>
plotDeplogo
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # creating a DLData object using default (DNA) alphabet and colors
# from a character vector with two entries
data <- DLData(c("ACGT", "ATTA"))
# creating a DLData object using a custom, binary alphabet and custom colors
data2 <- DLData(c("A,B,B,A,B", "A,B,B,A,A", "A,B,A,A,B"),
symbols = c("A", "B"), colors = c("red","green"), delim = ",")
# creating a DLData object from a data frame
# (created from a character vector, in this case)
vec <- c("A,B,B,A,B", "A,B,B,A,A", "A,B,A,A,B")
df <- as.data.frame(t(sapply(vec, function(a){strsplit(a, ",")[[1]]})))
data.df <- DLData(df, symbols = c("A", "B"), colors = c("red", "green"))
# creating a DLData object from sequences and weights, read from a tabular file
seqs <- read.table(system.file("extdata", "cjun.txt", package = "DepLogo"),
stringsAsFactors = FALSE)
data3 <- DLData(sequences = seqs[, 1], weights = log1p(seqs[, 2]) )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.