plotForest | R Documentation |
Forest plot
plotForest(x, gene, coef, ...)
## S4 method for signature 'dreamletResult'
plotForest(x, gene, coef, assays = names(x), ylim = NULL)
## S4 method for signature 'dreamlet_mash_result'
plotForest(x, gene, coef, assays = colnames(x$logFC.original), ylim = NULL)
x |
result from |
gene |
gene to show results for |
coef |
coefficient to test with |
... |
other arguments |
assays |
array of assays to plot |
ylim |
limits for the y axis |
Plot showing effect sizes
library(muscat)
library(SingleCellExperiment)
data(example_sce)
# create pseudobulk for each sample and cell cluster
pb <- aggregateToPseudoBulk(example_sce,
assay = "counts",
cluster_id = "cluster_id",
sample_id = "sample_id",
verbose = FALSE
)
# voom-style normalization
res.proc <- processAssays(pb, ~group_id)
# Differential expression analysis within each assay,
# evaluated on the voom normalized data
res.dl <- dreamlet(res.proc, ~group_id)
# show coefficients estimated for each cell type
coefNames(res.dl)
# Show estimated log fold change with in each cell type
plotForest(res.dl, gene = "ISG20", coef = "group_idstim")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.