
Plot fold-change distributions across comparisons
get_foldchange_boxplot.RdBuilds boxplots of log2 fold changes for selected genes and comparisons, optionally adding statistics.
Usage
get_foldchange_boxplot(
x,
genes = NULL,
sample_comparisons = NULL,
facet_by = c("auto", "comparison", "none"),
p.label = "p.signif",
stats_group = FALSE,
stats_method = "t.test"
)Arguments
- x
A
VISTAobject containing differential expression results.- genes
Optional character vector of gene IDs to include.
- sample_comparisons
Optional character vector of comparison names to plot.
- facet_by
Faceting mode:
"auto"(default),"comparison", or"none".- p.label
Label type passed to
ggpubr::stat_compare_means().- stats_group
Logical; add pairwise statistical tests when
TRUE.- stats_method
Statistical method passed to
ggpubr::stat_compare_means().
Examples
v <- example_vista()
comp <- names(comparisons(v))[1]
genes <- head(as.character(comparisons(v)[[comp]]$gene_id), 10)
p <- get_foldchange_boxplot(v, sample_comparison = comp, genes = genes)
print(p)