View source: R/signalMatrices.R
meltSignals | R Documentation |
Aggregates and melts a list of signal matrices, for plotting (with ggplot).
meltSignals(ml, fun = NULL, splitBy = NULL, trim = 0.98, assay = 1L)
ml |
A named list of signal matrices or an EnrichmentSE object as
produced by |
fun |
An optional custom aggregation function (or named list thereof). |
splitBy |
A vector of values (factor or character of length equal to 'nrow(ml)') by which to split the aggregation. Can also be the name of a column of 'rowData(ml)'. |
trim |
The quantile above which to trim values. If a numeric vector of length 2, will be used as lower and upper quantiles beyond which to trim. |
assay |
Assay to use (ignored unless 'ml' is an ESE object), defaults to the first assay. |
A data.frame.
# we first get an EnrichmentSE object:
data(exampleESE)
# we extract the means per position:
d <- meltSignals(exampleESE)
head(d)
## we could then plot for instance using ggplot:
# ggplot(d, aes(position, mean, colour=sample)) + geom_line(size=1.2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.