MAplot | R Documentation |
The function creates a 2D histogram of M and A values.
MAplot(
tbl,
group = c("all", colnames(tbl)),
plot = c("all", unique(tbl[["name"]]))
)
tbl |
|
group |
|
plot |
|
MAplot
returns a 2D hex histogram instead of a classical scatterplot
due to computational reasons and better visualization of overlaying points.
The argument plot
specifies the sample (refering to
colData(se)$name
) to be plotted. If plot = "all"
, MA values
for all samples will be plotted (samples will be plotted in facets).
If the number of features (tbl$Features
) is below 1000, points will be
plotted (via geom_points
), otherwise hexagons will be plotted
(via geom_hex
).
gg
object from ggplot2
## create se
set.seed(1)
a <- matrix(rnorm(10000), nrow = 1000, ncol = 10,
dimnames = list(seq_len(1000), paste("sample", seq_len(10))))
a[c(1, 5, 8), seq_len(5)] <- NA
cD <- data.frame(name = colnames(a), type = c(rep("1", 5), rep("2", 5)))
rD <- data.frame(spectra = rownames(a))
se <- SummarizedExperiment::SummarizedExperiment(assay = a,
rowData = rD, colData = cD)
tbl <- MAvalues(se, log = FALSE, group = "all")
MAplot(tbl, group = "all", plot = "all")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.