| Title: | Basic Bulk Workflows |
|---|---|
| Description: | Basic functions that leverage the tidyverse for analyses of (pseudo)bulk omic data. Differential expression and gene set enrichment are run with augere.de and augere.gsea, and basicBulk normalizes a SummarizedExperiment and tidies their results. It provides tables and publication-ready plots for the full workflow: PCA and expression QC, volcano, MA, and heatmap displays of differential expression, overlap (UpSet) and logFC correlation summaries across contrasts, and GSEA (Reactome) pathway analysis. |
| Authors: | Ben Laufer [aut, cre] (ORCID: <https://orcid.org/0000-0002-7558-1335>), Brad Friedman [aut] (ORCID: <https://orcid.org/0000-0002-5864-5253>) |
| Maintainer: | Ben Laufer <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 0.99.0 |
| Built: | 2026-11-24 04:29:22 UTC |
| Source: | https://github.com/BiocStaging/basicBulk |
Example DGEdata (the tidy differential-expression object
produced by makeDGEdata()) for the basicBulk workflow, built by testing
three cell lines against a shared reference (N61311, N061011, and
N080611 vs N052611) on the expression-filtered genes of the full
normalized airway data, then subset to the most variable retained genes plus
a few genes used in examples. It is a
named list of one tibble per contrast, with columns including ID,
symbol, LogFC, AveExpr, t, PValue, FDR, and B.
data(airwayDGE)data(airwayDGE)
A named list of three tibbles, one per contrast.
A named list of tibbles.
Example tidied GSEA results (the object produced by
tidyGSEAlist()) for the basicBulk workflow, built by running
camera on the expression-filtered genes of the full normalized airway
data against the Reactome gene sets
from getReactome() for each of the three contrasts. It is a named list of
one tibble per contrast, with columns Database, Term, NumGenes,
Direction, PValue, and FDR.
data(airwayGSEA)data(airwayGSEA)
A named list of three tibbles, one per contrast.
A named list of tibbles.
A cheap first-line freshness backstop for report/slide caches: stop with an
informative error if artifact is missing, or if its modification time
predates source. This catches the common "I re-ran an upstream step and
forgot to regenerate the cache" case. It is a timestamp check only — for a
guarantee that a cache reflects its inputs regardless of file mtimes (e.g. in
place edits, out-of-order re-saves), use cache_key() + load_if_fresh().
assert_fresh(artifact, source, regen_cmd = NULL)assert_fresh(artifact, source, regen_cmd = NULL)
artifact |
Path to the cached file that must be up to date. |
source |
Path to the input file the artifact is derived from. |
regen_cmd |
Optional string shown in the error telling the user how to regenerate the artifact. Defaults to "the step that creates it". |
Invisibly TRUE when the artifact is present and fresh; otherwise
stops with an error.
se0 <- augere.de::loadExampleDataset() data(airwayDGE) settings <- tempfile(fileext = ".RData") save(se0, file = settings) results <- tempfile(fileext = ".RData") save(airwayDGE, file = results) assert_fresh(results, settings)se0 <- augere.de::loadExampleDataset() data(airwayDGE) settings <- tempfile(fileext = ".RData") save(se0, file = settings) results <- tempfile(fileext = ".RData") save(airwayDGE, file = results) assert_fresh(results, settings)
Makes plots less baring
barStyle()barStyle()
An improved ggplot2
data(airwayDGE) airwayDGE %>% makeSigTibble() %>% makeSigCountTibble() %>% ggplot2::ggplot(ggplot2::aes(x = contrast, y = total)) + barStyle()data(airwayDGE) airwayDGE %>% makeSigTibble() %>% makeSigCountTibble() %>% ggplot2::ggplot(ggplot2::aes(x = contrast, y = total)) + barStyle()
Create a basic heatmap of DEGs or pathways.
basicHeatmap( se, sigTibble = NULL, geneSet = NULL, assay = "logCPM", contrast = NULL, pathways = FALSE, cluster_columns = FALSE, cluster_rows = TRUE, column_title = NULL, show_row_names = FALSE, show_column_names = FALSE, heatmap_legend_side = "bottom", annotation_legend_side = "right", verbose = FALSE, legendLimits = NULL, top_annotation = NULL, right_annotation = NULL, row_split = NULL, draw = TRUE, ... )basicHeatmap( se, sigTibble = NULL, geneSet = NULL, assay = "logCPM", contrast = NULL, pathways = FALSE, cluster_columns = FALSE, cluster_rows = TRUE, column_title = NULL, show_row_names = FALSE, show_column_names = FALSE, heatmap_legend_side = "bottom", annotation_legend_side = "right", verbose = FALSE, legendLimits = NULL, top_annotation = NULL, right_annotation = NULL, row_split = NULL, draw = TRUE, ... )
se |
A SummarizedExperiment object with "Group" in the colData. |
sigTibble |
A tibble of significant genes. |
geneSet |
A gene set of Ensembl IDs or symbols to use instead of the sigTibble; with
|
assay |
Character specifying the name of the assay from the se. |
contrast |
Character specifying the name of a contrast ( |
pathways |
Logical indicating whether sigTibble is a pathwayTibble. |
cluster_columns |
Whether make cluster on columns? Same settings as |
cluster_rows |
If the value is a logical, it controls whether to make cluster on rows. The value can also be a |
column_title |
Title on the column. |
show_row_names |
Whether show row names. |
show_column_names |
Whether show column names. |
heatmap_legend_side |
Character specifying the side for the heatmap legend. |
annotation_legend_side |
Character specifying the side for the annotation legend. |
verbose |
Logical indicating whether to print range of Z-scores |
legendLimits |
Manually override the legend limits |
top_annotation |
A |
right_annotation |
it should be specified by |
row_split |
Same as |
draw |
Logical indicating whether to call draw. |
... |
Additional arguments passed onto Heatmap. |
A HeatmapList object.
Gu Z, Eils R, Schlesner M (2016). Complex heatmaps reveal patterns and correlations in multidimensional genomic data. Bioinformatics. doi:10.1093/bioinformatics/btw313
se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") data(airwayDGE) basicHeatmap(se, sigTibble = makeSigTibble(airwayDGE))se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") data(airwayDGE) basicHeatmap(se, sigTibble = makeSigTibble(airwayDGE))
Create a grid of MA plots to examinine the LogFC (M) and average logCPM (A)
basicMA( DGEdata, nrow = NULL, ncol = NULL, FDRcutoff = 0.05, logFCcutoff = 1, pointShape = 19, pointSize = 0.1 )basicMA( DGEdata, nrow = NULL, ncol = NULL, FDRcutoff = 0.05, logFCcutoff = 1, pointShape = 19, pointSize = 0.1 )
DGEdata |
A list of DGE results |
nrow |
Number of rows |
ncol |
Number of columns |
FDRcutoff |
Numeric for the FDR cut-off for DEGs, default is 0.05 |
logFCcutoff |
Numeric for the absolute Log2FC cut-off for DEGs, default is 1 |
pointShape |
Numeric (or ".") specifying shape of points |
pointSize |
Numeric specifying size of points |
A ggplot2 wrap
data(airwayDGE) basicMA(airwayDGE)data(airwayDGE) basicMA(airwayDGE)
A wrapper for upset
basicUpset( DGEdata, directionSplit = TRUE, FDRcutoff = 0.05, logFCcutoff = 1, n_intersections = 40, width_ratio = 0.1, height_ratio = 0.95, counts = TRUE, sort_sets = "descending", fontSize = 12, fontSizeOverall = 9 )basicUpset( DGEdata, directionSplit = TRUE, FDRcutoff = 0.05, logFCcutoff = 1, n_intersections = 40, width_ratio = 0.1, height_ratio = 0.95, counts = TRUE, sort_sets = "descending", fontSize = 12, fontSizeOverall = 9 )
DGEdata |
A list of DGE results |
directionSplit |
Logical indicating whether gene lists should be split by direction, default is TRUE |
FDRcutoff |
Numeric for the FDR cut-off for DEGs, default is 0.05 |
logFCcutoff |
Numeric for the absolute Log2FC cut-off for DEGs, default is 1 |
n_intersections |
the exact number of the intersections to be displayed; n largest intersections that meet the size and degree criteria will be shown |
width_ratio |
ratio of the overall set size width to intersection matrix width |
height_ratio |
ratio of the intersection matrix to intersection size height |
counts |
whether to display count number labels above the bars |
sort_sets |
whether to sort the rows in the intersection matrix (descending sort by default); one of: |
fontSize |
Integer specifying font size |
fontSizeOverall |
Integer specifying font size for overall set size axis labels |
A ggplot2
Lex A, Gehlenborg N, Strobelt H, Vuillemot R, Pfister H (2014). UpSet: visualization of intersecting sets. IEEE Transactions on Visualization and Computer Graphics, 20(12), 1983-1992. doi:10.1109/TVCG.2014.2346248
Krassowski M (2020). ComplexUpset. doi:10.5281/zenodo.3700590
data(airwayDGE) basicUpset(airwayDGE)data(airwayDGE) basicUpset(airwayDGE)
A wrap of basic volcanos with DEG counts
basicVolcano( DGEdata, FDRcutoff = 0.05, logFCcutoff = 1, lab = NULL, pointSize = 0.1, nrow = NULL, ncol = NULL, labSize = 9, labFace = "italic", style = c("basic", "enhanced") )basicVolcano( DGEdata, FDRcutoff = 0.05, logFCcutoff = 1, lab = NULL, pointSize = 0.1, nrow = NULL, ncol = NULL, labSize = 9, labFace = "italic", style = c("basic", "enhanced") )
DGEdata |
A list of DGE results |
FDRcutoff |
Numeric for the FDR cut-off for DEGs, default is 0.05 |
logFCcutoff |
Numeric for the absolute Log2FC cut-off for DEGs, default is 1 |
lab |
TRUE adds labels for all significant genes, while a character vector of gene symbols will only label that selection |
pointSize |
Numeric specifying the size of the points |
nrow |
Number of rows |
ncol |
Number of columns |
labSize |
Numeric for font size of labels (in pt) |
labFace |
Character specifying font face of gene labels (i.e bold, italic, bolditalic) |
style |
Character specifying either a "basic" or "enhanced" style. |
A ggplot2 wrap
data(airwayDGE) basicVolcano(airwayDGE)data(airwayDGE) basicVolcano(airwayDGE)
Makes a ggboxplot
boxPlot(data, x, y, color, size = 1.25, plotly = FALSE, ...)boxPlot(data, x, y, color, size = 1.25, plotly = FALSE, ...)
data |
The data |
x |
Column for the x-axis |
y |
Column for the y-axis |
color |
Column for the color |
size |
Numeric specifying size of the dots |
plotly |
Logical indicating whether to add the text aes for ggplotly |
... |
Additional arguments for ggboxplot |
A stylish ggppubr boxplot
se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") se %>% tibble::as_tibble() %>% dplyr::filter(symbol == "FKBP5") %>% boxPlot(x = "Group", y = "logCPM", color = "Group")se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") se %>% tibble::as_tibble() %>% dplyr::filter(symbol == "FKBP5") %>% boxPlot(x = "Group", y = "logCPM", color = "Group")
Computes a stable digest of the objects a cached computation depends on, for
use as the freshness key with save_cache() / load_if_fresh(). Pass the
actual input objects (e.g. the assay matrix and colData of the normalized
SummarizedExperiment, the design matrix, the contrast list, the gene sets),
so that any change to a hashed input — an outlier sample removed, a covariate /
block / dc.block changed, a contrast or gene set edited — changes the key and
forces a recompute. Key on the inputs only, not on package versions or function
code: when an upgrade could change the results, force a recompute instead.
Because the objects are hashed (not a hand-maintained list of field names), a
newly added input is captured automatically.
cache_key(...)cache_key(...)
... |
The invalidating inputs to hash (any R objects and/or strings). |
Hash data objects, not environments or closures, which do not hash stably.
Key on the inputs that determine the result. The sample colData, the gene
rownames, the model/contrast specification and the gene-set collection catch a
dropped sample or a changed covariate/block/dc.block, but not revised counts
under the same sample and gene names: add the count values when the input counts
can change. Avoid hashing a DelayedArray / HDF5-backed assay directly — it may
hash on its backing pointer rather than its contents; realize it with
as.matrix() first.
A single character string (the digest).
se0 <- augere.de::loadExampleDataset() cache_key(SummarizedExperiment::colData(se0), rownames(se0))se0 <- augere.de::loadExampleDataset() cache_key(SummarizedExperiment::colData(se0), rownames(se0))
Generate a function for a color palette for a heatmap
colorRamp3( mat, heatColors = MetBrewer::met.brewer("Troy", n = 10, type = "continuous") %>% as.character() %>% rev() %>% append("#f6f2ee", after = 5), legendLimits = NULL )colorRamp3( mat, heatColors = MetBrewer::met.brewer("Troy", n = 10, type = "continuous") %>% as.character() %>% rev() %>% append("#f6f2ee", after = 5), legendLimits = NULL )
mat |
A Matrix |
heatColors |
Character vector of colors that has an odd number of colors with a midpoint; the default is MetBrewer's Troy palette (10 colors, blue to red) around a white midpoint |
legendLimits |
Manually override the legend limits |
A function
se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") SummarizedExperiment::assay(se, "logCPM")[getHVGs(se, n = 20, symbols = FALSE), ] %>% scaleRows() %>% colorRamp3()se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") SummarizedExperiment::assay(se, "logCPM")[getHVGs(se, n = 20, symbols = FALSE), ] %>% scaleRows() %>% colorRamp3()
Plot the lower triangle of logFC correlations from prepareCor
corTriplot(corRes)corTriplot(corRes)
corRes |
cor_df from prepareCor |
A ggplot
Laufer BI, Friedman BA (2026). gg4way: 4way Plots of Differential Expression. R package. doi:10.18129/B9.bioc.gg4way
Kuhn M, Jackson S, Cimentada J (2025). corrr: Correlations in R. R package. doi:10.32614/CRAN.package.corrr
se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") data(airwayDGE) corRes <- tidyr::crossing(x = names(airwayDGE), y = names(airwayDGE)) %>% dplyr::filter(x != y) %>% dplyr::mutate(name = paste(stringr::str_remove(x, " vs .*"), "vs", stringr::str_remove(y, " vs .*"))) %>% prepareCor(airwayDGE, cd = SummarizedExperiment::colData(se)) corTriplot(corRes)se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") data(airwayDGE) corRes <- tidyr::crossing(x = names(airwayDGE), y = names(airwayDGE)) %>% dplyr::filter(x != y) %>% dplyr::mutate(name = paste(stringr::str_remove(x, " vs .*"), "vs", stringr::str_remove(y, " vs .*"))) %>% prepareCor(airwayDGE, cd = SummarizedExperiment::colData(se)) corTriplot(corRes)
Bar plot of total DEGs
DEGbar( sigTabyl, x = "contrast", addCounts = TRUE, flip = TRUE, linewidth = 0.1 )DEGbar( sigTabyl, x = "contrast", addCounts = TRUE, flip = TRUE, linewidth = 0.1 )
sigTabyl |
A tibble from makeSigCountTibble or a sigTibble run
through |
x |
Character specifying the x-axis variable |
addCounts |
Logical indicating whether to add text with totals |
flip |
Logical indicating whether to flip the coordinates |
linewidth |
Numeric specifying linewidth for black outline |
A ggplot2
data(airwayDGE) airwayDGE %>% makeSigTibble() %>% makeSigCountTibble() %>% DEGbar()data(airwayDGE) airwayDGE %>% makeSigTibble() %>% makeSigCountTibble() %>% DEGbar()
Makes a ggstripchart
dotPlot( data, x, y, color, shape = 21, size = 1.25, alpha = 0.6, jitter = 0, plotly = FALSE, ... )dotPlot( data, x, y, color, shape = 21, size = 1.25, alpha = 0.6, jitter = 0, plotly = FALSE, ... )
data |
a data frame |
x |
character string containing the name of x variable. |
y |
character vector containing one or more variables to plot |
color |
outline color. |
shape |
point shape |
size |
Numeric value (e.g.: size = 1). change the size of points and outlines. |
alpha |
Numeric specifying the alpha |
jitter |
the amount of jitter. |
plotly |
Logical indicating whether to add the text aes for ggplotly |
... |
Arguments passed on to
|
A stylish ggppubr strip chart
se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") se %>% tibble::as_tibble() %>% dplyr::filter(symbol == "FKBP5") %>% dotPlot(x = "Group", y = "logCPM", color = "Group")se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") se %>% tibble::as_tibble() %>% dplyr::filter(symbol == "FKBP5") %>% dotPlot(x = "Group", y = "logCPM", color = "Group")
Extract the clustered matrix and relevant metadata from a heatmap for figure source data
extractHeatmap(se, heatmap)extractHeatmap(se, heatmap)
se |
A SummarizedExperiment object |
heatmap |
A drawn heatmap from basicHeatmap |
A tibble
se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") data(airwayDGE) heatmap <- basicHeatmap(se, sigTibble = makeSigTibble(airwayDGE)) extractHeatmap(se, heatmap)se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") data(airwayDGE) heatmap <- basicHeatmap(se, sigTibble = makeSigTibble(airwayDGE)) extractHeatmap(se, heatmap)
Extract gene IDs from an intersection in an UpSet plot
extractUpSet(DGEcontrasts, DGEdata, FDRcutoff = 0.05, logFCcutoff = 1)extractUpSet(DGEcontrasts, DGEdata, FDRcutoff = 0.05, logFCcutoff = 1)
DGEcontrasts |
A character vector of the UpSet sets to intersect: |
DGEdata |
A list of DGE results |
FDRcutoff |
Numeric for the FDR cut-off for DEGs, default is 0.05 |
logFCcutoff |
Numeric for the absolute Log2FC cut-off for DEGs, default is 1 |
A character vector of the gene IDs in the requested overlap.
data(airwayDGE) names(airwayDGE) %>% paste("Up") %>% extractUpSet(airwayDGE)data(airwayDGE) names(airwayDGE) %>% paste("Up") %>% extractUpSet(airwayDGE)
Formats a p-value (or any numeric) as e.g. "1.2e-04". Raw numeric p-values
render inconsistently inside inline knitr r expressions; pre-formatting with
fmt_e() keeps slide/report values stable.
fmt_e(x)fmt_e(x)
x |
A numeric vector. |
A character vector in scientific notation with one decimal place.
fmt_e(0.000123)fmt_e(0.000123)
Convert a named list of sets to a data.frame of set membership with the elements as rownames
fromList2(input)fromList2(input)
input |
A named list of character vectors |
A data.frame of 0/1 set membership, with one row per element (rownames) and one column per set.
data(airwayDGE) airwayDGE %>% purrr::map(~ dplyr::filter(.x, FDR < 0.05) %>% dplyr::pull(ID)) %>% fromList2()data(airwayDGE) airwayDGE %>% purrr::map(~ dplyr::filter(.x, FDR < 0.05) %>% dplyr::pull(ID)) %>% fromList2()
Histograms of mean gene expression for each group
geneHistogram(se, geneSymbol = NULL, assay = "logCPM", palette = "category20")geneHistogram(se, geneSymbol = NULL, assay = "logCPM", palette = "category20")
se |
A SummarizedExperiment object |
geneSymbol |
An optional character vector specifying the gene to draw a mean expression line for |
assay |
Assay from se to use |
palette |
Character specifying palette name for scale_color_d3 |
A ggplot
se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") geneHistogram(se, geneSymbol = "FKBP5")se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") geneHistogram(se, geneSymbol = "FKBP5")
Faceted plots for genes of interest
genePlot( se, genes, DGEdata = NULL, assay = "logCPM", addStats = !is.null(DGEdata), ref.group = NULL, logFCcutoff = 1, plotType = c("dot", "box"), size = 2, jitter = 0.1, nrow = NULL, ncol = NULL, nrow_legend = NULL, tip.length = 0, ggprism = FALSE, nudge_y = ifelse(is.null(ref.group), 0, 0.1), ... )genePlot( se, genes, DGEdata = NULL, assay = "logCPM", addStats = !is.null(DGEdata), ref.group = NULL, logFCcutoff = 1, plotType = c("dot", "box"), size = 2, jitter = 0.1, nrow = NULL, ncol = NULL, nrow_legend = NULL, tip.length = 0, ggprism = FALSE, nudge_y = ifelse(is.null(ref.group), 0, 0.1), ... )
se |
A SummarizedExperiment object, or a tibble of
gene set scores from joinFeatures with |
genes |
A character vector specifying the genes (or gene sets) to plot |
DGEdata |
A list of DGE results, which requires a
SummarizedExperiment |
assay |
Assay from se to use |
addStats |
Logical indicating whether to add significance annotations from |
ref.group |
Character specifying reference group for statistics |
logFCcutoff |
Numeric for the absolute Log2FC cut-off for DEGs, default is 1 |
plotType |
A character specifying a "box" or "dot" plot |
size |
Numeric specifying size of the dots |
jitter |
Numeric specifying jitter of the dots (for dot plot only) |
nrow |
Number of rows |
ncol |
Number of columns |
nrow_legend |
Number of rows for the legend |
tip.length |
Numeric specifying length of bracket tips |
ggprism |
Logical indicating whether a prism theme should be applied |
nudge_y |
Numeric specifying the multiplier to increase spacing between statistics results and max y value;
the default is 0.1 with a |
... |
Arguments passed on to
|
A ggplot
se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") genePlot(se, genes = c("RARRES1", "TMEM176B", "GBP3")) ## Gene set scores gene.sets <- getReactome("Homo sapiens") gene.sets[c("REACTOME_CELL_SURFACE_INTERACTIONS_AT_THE_VASCULAR_WALL", "REACTOME_MUSCLE_CONTRACTION")] %>% purrr::map(~ joinFeatures(se, features = .x, score = TRUE)) %>% purrr::list_rbind(names_to = "symbol") %>% genePlot(genes = unique(.$symbol))se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") genePlot(se, genes = c("RARRES1", "TMEM176B", "GBP3")) ## Gene set scores gene.sets <- getReactome("Homo sapiens") gene.sets[c("REACTOME_CELL_SURFACE_INTERACTIONS_AT_THE_VASCULAR_WALL", "REACTOME_MUSCLE_CONTRACTION")] %>% purrr::map(~ joinFeatures(se, features = .x, score = TRUE)) %>% purrr::list_rbind(names_to = "symbol") %>% genePlot(genes = unique(.$symbol))
Get highly variable genes.
getHVGs(se, assay = "logCPM", n = 100, symbols = TRUE)getHVGs(se, assay = "logCPM", n = 100, symbols = TRUE)
se |
A SummarizedExperiment object |
assay |
Character specifying the name of the assay from the se |
n |
Integer specifying the number of genes. |
symbols |
Logical indicating to return gene symbols instead of Ensembl IDs. |
A character vector
se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") getHVGs(se, n = 20)se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") getHVGs(se, n = 20)
Get the Reactome pathway collection (MSigDB C2:CP:REACTOME) for GSEA as a named list
of Ensembl gene IDs, via msigdbr. Set names follow the REACTOME_*
convention expected by tidyGSEAlist and makePathwayTibble, and the Ensembl IDs
match the row names used by runContrast.
getReactome(organism)getReactome(organism)
organism |
Organism of interest c("Homo sapiens", "Mus musculus") |
A named list of character vectors of Ensembl gene IDs
Subramanian A, Tamayo P, Mootha VK, Mukherjee S, Ebert BL, Gillette MA, Paulovich A, Pomeroy SL, Golub TR, Lander ES, Mesirov JP (2005). Gene set enrichment analysis: a knowledge-based approach for interpreting genome-wide expression profiles. Proceedings of the National Academy of Sciences, 102(43), 15545-15550. doi:10.1073/pnas.0506580102
Liberzon A, Birger C, Thorvaldsdóttir H, Ghandi M, Mesirov JP, Tamayo P (2015). The Molecular Signatures Database hallmark gene set collection. Cell Systems, 1(6), 417-425. doi:10.1016/j.cels.2015.12.004
Ragueneau E, Gong C, Sinquin P, Sevilla C, Beavers D, Grentner A, Griss J, Hogue GFJ, Li NT, Matthews L, May B, Milacic M, Mohammadi H, Petryszak R, Rothfels K, Shamovsky V, Stephan R, Tiwari K, Weiser J, Wright A, Gillespie M, Wu G, Stein L, Hermjakob H, D'Eustachio P (2025). The Reactome Knowledgebase 2026. Nucleic Acids Research, 54(D1), D673-D681. doi:10.1093/nar/gkaf1223
gene.sets <- getReactome("Homo sapiens")gene.sets <- getReactome("Homo sapiens")
Plot GSEA results
GSEAplot(GSEA, n_terms = 5)GSEAplot(GSEA, n_terms = 5)
GSEA |
A tibble of GSEA results for one contrast, an element of the tidyGSEAlist output |
n_terms |
Numeric specifying number of terms per a facet (Up and Down) |
A ggplot2
data(airwayGSEA) GSEAplot(airwayGSEA[[1]])data(airwayGSEA) GSEAplot(airwayGSEA[[1]])
Create a list of GSEA plots for all comparisons
GSEAplotList(GSEAlist, n_terms = 5)GSEAplotList(GSEAlist, n_terms = 5)
GSEAlist |
A named list of GSEA result tibbles from tidyGSEAlist |
n_terms |
Numeric specifying number of terms per a facet (Up and Down) |
A list of ggplots
data(airwayGSEA) GSEAplotList(airwayGSEA)data(airwayGSEA) GSEAplotList(airwayGSEA)
Join features in the tidy transcriptomics style
joinFeatures( se, features, symbol = FALSE, score = FALSE, long = TRUE, assay = "logCPM" )joinFeatures( se, features, symbol = FALSE, score = FALSE, long = TRUE, assay = "logCPM" )
se |
A SummarizedExperiment object |
features |
A character vector of features |
symbol |
Logical indicating whether the feature character vector contains gene symbols, FALSE indicates it contains Ensembl IDs |
score |
Logical indicating whether a gene set score should be returned |
long |
Logical indicating whether long format should be returned (FALSE for wide matrix style) |
assay |
Assay from se to use |
A tibble
se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") joinFeatures(se, c("RARRES1", "TMEM176B", "GBP3"), symbol = TRUE)se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") joinFeatures(se, c("RARRES1", "TMEM176B", "GBP3"), symbol = TRUE)
The safe-by-default guarded loader. Loads file (written by save_cache())
into envir only when its stored freshness key is identical to key
(the current inputs, from cache_key()). In every other case — the file is
missing, unreadable, carries no stored key (an old or foreign cache), or its
key differs from key — it returns FALSE without loading anything, so
the caller recomputes. This makes stale caches fail safe: a change to any
hashed input forces a recompute rather than silently reusing an old result.
load_if_fresh(file, key, envir = parent.frame())load_if_fresh(file, key, envir = parent.frame())
file |
Path to the |
key |
The current freshness key from |
envir |
Environment to load the cached objects into on a hit. Defaults to the caller's environment. |
The guard is enforced wherever this runs — a report chunk, the R console, an unattended re-render — so freshness does not depend on any external process being "aware" of the change. Chain it across dependent caches (each keyed on its freshly-computed upstream) so staleness cannot propagate through a cache-of-a-cache.
TRUE (and injects the cached objects into envir) on a fresh hit;
otherwise FALSE and nothing is loaded.
se0 <- augere.de::loadExampleDataset() data(airwayGSEA) key <- cache_key(SummarizedExperiment::colData(se0), rownames(se0)) file <- tempfile(fileext = ".RData") save_cache(file, key, GSEAlist = airwayGSEA) load_if_fresh(file, key)se0 <- augere.de::loadExampleDataset() data(airwayGSEA) key <- cache_key(SummarizedExperiment::colData(se0), rownames(se0)) file <- tempfile(fileext = ".RData") save_cache(file, key, GSEAlist = airwayGSEA) load_if_fresh(file, key)
Create a named list of DGE stats tibbles for downstream functions
makeDGEdata(se, voomList)makeDGEdata(se, voomList)
se |
A SummarizedExperiment object |
voomList |
A list of tibbles
Ritchie ME, Phipson B, Wu D, Hu Y, Law CW, Shi W, Smyth GK (2015). limma powers differential expression analyses for RNA-sequencing and microarray studies. Nucleic Acids Research, 43(7), e47. doi:10.1093/nar/gkv007
Law CW, Chen Y, Shi W, Smyth GK (2014). voom: precision weights unlock linear model analysis tools for RNA-seq read counts. Genome Biology, 15(2), R29. doi:10.1186/gb-2014-15-2-r29
se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") voomList <- se %>% augere.de::runVoom(groups = "cell", block = "dex", comparisons = list(c("N61311", "N052611")), assay = "counts", output.dir = tempfile(), save.results = FALSE) %>% magrittr::extract2("results") makeDGEdata(se, voomList)se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") voomList <- se %>% augere.de::runVoom(groups = "cell", block = "dex", comparisons = list(c("N61311", "N052611")), assay = "counts", output.dir = tempfile(), save.results = FALSE) %>% magrittr::extract2("results") makeDGEdata(se, voomList)
Make a tibble of pathways for basicHeatmap
makePathwayTibble(pathways, gene.sets)makePathwayTibble(pathways, gene.sets)
pathways |
A character vector of pathway terms from printGSEAtibble |
gene.sets |
Gene sets from getReactome |
A tibble
data(airwayGSEA) gene.sets <- getReactome("Homo sapiens") airwayGSEA[[1]] %>% dplyr::slice(1:2) %>% dplyr::pull(Term) %>% stringr::str_replace_all(" ", "_") %>% paste0("REACTOME_", .) %>% makePathwayTibble(gene.sets)data(airwayGSEA) gene.sets <- getReactome("Homo sapiens") airwayGSEA[[1]] %>% dplyr::slice(1:2) %>% dplyr::pull(Term) %>% stringr::str_replace_all(" ", "_") %>% paste0("REACTOME_", .) %>% makePathwayTibble(gene.sets)
Prepare the sigTibble for DEGbar
makeSigCountTibble(sigTibble)makeSigCountTibble(sigTibble)
sigTibble |
A tibble from makeSigTibble. Every |
A tibble
data(airwayDGE) airwayDGE %>% makeSigTibble() %>% makeSigCountTibble()data(airwayDGE) airwayDGE %>% makeSigTibble() %>% makeSigCountTibble()
Make the sigTibble
makeSigTibble(DGEdata, FDRcutoff = 0.05, logFCcutoff = 1)makeSigTibble(DGEdata, FDRcutoff = 0.05, logFCcutoff = 1)
DGEdata |
A list of tibbles with tidied voom results |
FDRcutoff |
Numeric for the FDR cut-off for DEGs, default is 0.05 |
logFCcutoff |
Numeric for the absolute Log2FC cut-off for DEGs, default is 1 |
A tibble of tidied significant DGE results, with contrast a factor whose levels are all the
DGEdata names
data(airwayDGE) makeSigTibble(airwayDGE)data(airwayDGE) makeSigTibble(airwayDGE)
A grid with a PCA biplot and top loadings for PCs 1 and 2
PCAgrid(se, assay = "logCPM", removeVar = 0.1, pal = NULL, ...)PCAgrid(se, assay = "logCPM", removeVar = 0.1, pal = NULL, ...)
se |
A SummarizedExperiment object |
assay |
Assay from se to use |
removeVar |
Argument to remove lower percent of variables for pca |
pal |
Named character vector of colors for the PCA biplot |
... |
Additional arguments for PCAplot() |
A ggplot (a cowplot grid of the PCA biplot and loadings).
Blighe K, Andrews J, Lun A (2026). PCAtools: Everything Principal Components Analysis. R package. doi:10.18129/B9.bioc.PCAtools
se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") PCAgrid(se, colby = "dex", shape = "cell")se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") PCAgrid(se, colby = "dex", shape = "cell")
Wrapper for generating a PCA biplot with PCAtools via pca and biplot
PCAplot( se, PCA = NULL, assay = "logCPM", colby = "Group", lab = "Sample", pointSize = 6, labSize = 4, alpha = 1, legendPosition = "bottom", legendLabSize = 16, legendIconSize = 6, palette = "category20", x = "PC1", y = "PC2", ... )PCAplot( se, PCA = NULL, assay = "logCPM", colby = "Group", lab = "Sample", pointSize = 6, labSize = 4, alpha = 1, legendPosition = "bottom", legendLabSize = 16, legendIconSize = 6, palette = "category20", x = "PC1", y = "PC2", ... )
se |
A SummarizedExperiment object |
PCA |
A pca object from pca |
assay |
Assay from se to use |
colby |
colData variable to color points by |
lab |
colData variable to label points by, or |
pointSize |
Size of plotted points. |
labSize |
Size of labels. |
alpha |
Numeric specifying alpha for points |
legendPosition |
Position of legend ('top', 'bottom', 'left', 'right', 'none'). |
legendLabSize |
Size of plot legend text. |
legendIconSize |
Size of plot legend icons / symbols. |
palette |
Palette type. There are four available options:
|
x |
A principal component to plot on x-axis. All principal component names are stored in pcaobj$label. |
y |
A principal component to plot on y-axis. All principal component names are stored in pcaobj$label. |
... |
Arguments passed on to
|
A ggplot2
se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") PCAplot(se)se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") PCAplot(se)
Plot of results from PCA loadings from getLoadings
plotPCAloadings(PCA, se)plotPCAloadings(PCA, se)
PCA |
A pca object from pca |
se |
A SummarizedExperiment object |
A ggplot of the PC1 and PC2 loadings.
se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") plotPCAloadings(runPCA(se), se)se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") plotPCAloadings(runPCA(se), se)
Calculate pairwise logFC correlations with getCor, returned in long or wide (corrr) format
prepareCor( corTibble, DGEdata, cd, format = c("wide", "long"), .progress = TRUE )prepareCor( corTibble, DGEdata, cd, format = c("wide", "long"), .progress = TRUE )
corTibble |
A dataframe used to specify correlations through the following columns: x, y, name |
DGEdata |
A list of DGE results |
cd |
colData from a SummarizedExperiment object |
format |
Character specifying the format of the returned data frame, "wide" (the default) or "long" |
.progress |
Whether to show a progress bar. Use |
A dataframe
Laufer BI, Friedman BA (2026). gg4way: 4way Plots of Differential Expression. R package. doi:10.18129/B9.bioc.gg4way
Kuhn M, Jackson S, Cimentada J (2025). corrr: Correlations in R. R package. doi:10.32614/CRAN.package.corrr
se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") data(airwayDGE) corRes <- tidyr::crossing(x = names(airwayDGE), y = names(airwayDGE)) %>% dplyr::filter(x != y) %>% dplyr::mutate(name = paste(stringr::str_remove(x, " vs .*"), "vs", stringr::str_remove(y, " vs .*"))) %>% prepareCor(airwayDGE, cd = SummarizedExperiment::colData(se))se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") data(airwayDGE) corRes <- tidyr::crossing(x = names(airwayDGE), y = names(airwayDGE)) %>% dplyr::filter(x != y) %>% dplyr::mutate(name = paste(stringr::str_remove(x, " vs .*"), "vs", stringr::str_remove(y, " vs .*"))) %>% prepareCor(airwayDGE, cd = SummarizedExperiment::colData(se))
Print the corTibble
printCorTibble(corTibble, BiocStyle = FALSE)printCorTibble(corTibble, BiocStyle = FALSE)
corTibble |
A tibble of tidied correlations |
BiocStyle |
Logical indicating whether the table is rendered in a BiocStyle vignette, where the per-column filter boxes misalign, so they are dropped in favour of the global search |
A datatable
se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") data(airwayDGE) corRes <- tidyr::crossing(x = names(airwayDGE), y = names(airwayDGE)) %>% dplyr::filter(x != y) %>% dplyr::mutate(name = paste(stringr::str_remove(x, " vs .*"), "vs", stringr::str_remove(y, " vs .*"))) %>% prepareCor(airwayDGE, cd = SummarizedExperiment::colData(se), format = "long") printCorTibble(corRes)se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") data(airwayDGE) corRes <- tidyr::crossing(x = names(airwayDGE), y = names(airwayDGE)) %>% dplyr::filter(x != y) %>% dplyr::mutate(name = paste(stringr::str_remove(x, " vs .*"), "vs", stringr::str_remove(y, " vs .*"))) %>% prepareCor(airwayDGE, cd = SummarizedExperiment::colData(se), format = "long") printCorTibble(corRes)
Print a table of significant GSEA results
printGSEAtibble(GSEAlist, BiocStyle = FALSE)printGSEAtibble(GSEAlist, BiocStyle = FALSE)
GSEAlist |
A named list of GSEA result tibbles from tidyGSEAlist |
BiocStyle |
Logical indicating whether the table is rendered in a BiocStyle vignette, where the per-column filter boxes misalign, so they are dropped in favour of the global search |
A datatable
data(airwayGSEA) printGSEAtibble(airwayGSEA)data(airwayGSEA) printGSEAtibble(airwayGSEA)
Create tabs of heatmaps in R Markdown
printHeatmaps(.x, .y, depth = 2)printHeatmaps(.x, .y, depth = 2)
.x |
plot |
.y |
title |
depth |
Number of # to use |
printHeatmaps
NULL; called for its side effect of printing a markdown header followed by the heatmap.
se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") data(airwayDGE) list(DEGs = basicHeatmap(se, sigTibble = makeSigTibble(airwayDGE))) %>% purrr::iwalk(printHeatmaps)se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") data(airwayDGE) list(DEGs = basicHeatmap(se, sigTibble = makeSigTibble(airwayDGE))) %>% purrr::iwalk(printHeatmaps)
Create tabs of ggplots in R Markdown
printPlots(.x, .y, depth = 2)printPlots(.x, .y, depth = 2)
.x |
plot |
.y |
title |
depth |
Number of # to use |
printPlots
NULL; called for its side effect of printing a markdown header followed by the plot.
data(airwayGSEA) airwayGSEA %>% GSEAplotList() %>% purrr::iwalk(printPlots)data(airwayGSEA) airwayGSEA %>% GSEAplotList() %>% purrr::iwalk(printPlots)
Print the sigTibble
printSigTibble(sigTibble, rearrange = TRUE, BiocStyle = FALSE)printSigTibble(sigTibble, rearrange = TRUE, BiocStyle = FALSE)
sigTibble |
A tibble of tidied significant DGE results |
rearrange |
Logical indicating whether to sort by contrast and FDR |
BiocStyle |
Logical indicating whether the table is rendered in a BiocStyle vignette, where the per-column filter boxes misalign, so they are dropped in favour of the global search |
A datatable
data(airwayDGE) airwayDGE %>% makeSigTibble() %>% printSigTibble()data(airwayDGE) airwayDGE %>% makeSigTibble() %>% printSigTibble()
Wrapper for generating a PCA with PCAtools via pca
runPCA(se, assay = "logCPM", removeVar = 0.1)runPCA(se, assay = "logCPM", removeVar = 0.1)
se |
A SummarizedExperiment object |
assay |
Assay from se to use |
removeVar |
Argument to remove lower percent of variables for the pca |
A pca object.
se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") runPCA(se)se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") runPCA(se)
Saves named objects to file together with the content-hash key produced by
cache_key(), so load_if_fresh() can later verify the cache matches its
current inputs before loading it.
save_cache(file, key, ...)save_cache(file, key, ...)
file |
Path to write the |
key |
The freshness key from |
... |
Named objects to store in the cache (e.g. |
Invisibly, the file path.
se0 <- augere.de::loadExampleDataset() data(airwayGSEA) key <- cache_key(SummarizedExperiment::colData(se0), rownames(se0)) file <- tempfile(fileext = ".RData") save_cache(file, key, GSEAlist = airwayGSEA)se0 <- augere.de::loadExampleDataset() data(airwayGSEA) key <- cache_key(SummarizedExperiment::colData(se0), rownames(se0)) file <- tempfile(fileext = ".RData") save_cache(file, key, GSEAlist = airwayGSEA)
Scale a matrix by rows to generate Z-scores for a heatmap
scaleRows(mat, verbose = TRUE)scaleRows(mat, verbose = TRUE)
mat |
A Matrix |
verbose |
Logical indicating whether to print range of Z-scores |
A matrix of row z-scores (the rows of mat centred and scaled).
se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") SummarizedExperiment::assay(se, "logCPM")[getHVGs(se, n = 20, symbols = FALSE), ] %>% scaleRows()se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") SummarizedExperiment::assay(se, "logCPM")[getHVGs(se, n = 20, symbols = FALSE), ] %>% scaleRows()
Create a named list of GSEA tibbles for downstream functions
tidyGSEAlist(GSEAlist, GSEAmethod = "camera")tidyGSEAlist(GSEAlist, GSEAmethod = "camera")
GSEAlist |
A named list of runContrast results, one per contrast |
GSEAmethod |
Character specifying name of GSEA method to extract |
A list of tibbles
Wu D, Smyth GK (2012). Camera: a competitive gene set test accounting for inter-gene correlation. Nucleic Acids Research, 40(17), e133. doi:10.1093/nar/gks461
se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") gene.sets <- getReactome("Homo sapiens") list(N61311 = se %>% augere.gsea::runContrast(sets = gene.sets, groups = "cell", block = "dex", comparison = c("N61311", "N052611"), methods = "camera", assay = "counts", output.dir = tempfile(), save.results = FALSE)) %>% tidyGSEAlist()se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") gene.sets <- getReactome("Homo sapiens") list(N61311 = se %>% augere.gsea::runContrast(sets = gene.sets, groups = "cell", block = "dex", comparison = c("N61311", "N052611"), methods = "camera", assay = "counts", output.dir = tempfile(), save.results = FALSE)) %>% tidyGSEAlist()
Tidy and normalize a SummarizedExperiment
by adding assays for downstream analyses and visualization. Genes are filtered with
filterByExpr, TMM normalization factors are calculated with normLibSizes, and the
expression (E) matrix from voomWithQualityWeights (the quality weights are not stored)
becomes the logCPM assay, with NA for the filtered genes. When adjustBatch = TRUE, a
ComBat assay holds voom values from ComBat_seq-adjusted counts.
tidySE( se, group = "Group", covariates = NULL, block = NULL, groups = se %>% SummarizedExperiment::colData() %>% as.data.frame() %>% purrr::pluck(group) %>% forcats::as_factor() %>% levels() %>% purrr::set_names(), adjustBatch = FALSE )tidySE( se, group = "Group", covariates = NULL, block = NULL, groups = se %>% SummarizedExperiment::colData() %>% as.data.frame() %>% purrr::pluck(group) %>% forcats::as_factor() %>% levels() %>% purrr::set_names(), adjustBatch = FALSE )
se |
A SummarizedExperiment with a
|
group |
Character specifying the colData column to tidy into the |
covariates |
Character vector of colData columns with numeric covariates |
block |
Character vector of colData columns with blocking factors |
groups |
Named character vector for group factor recoding |
adjustBatch |
Logical indicating whether a |
The input se must have a counts assay. Downstream basicBulk functions expect a
rowData ID column and, for symbol-based plots and labelled heatmaps, a symbol
column. The logCPM/ComBat assays are NA for genes that did not pass
filterByExpr.
The input se with an added logCPM (and ComBat) assay, a
retained rowData column, and Group/Sample/lib.size/norm.factors
in the colData
Chen Y, Lun ATL, Smyth GK (2016). From reads to genes to pathways: differential expression analysis of RNA-Seq experiments using Rsubread and the edgeR quasi-likelihood pipeline. F1000Research, 5, 1438. doi:10.12688/f1000research.8987.2
Robinson MD, Oshlack A (2010). A scaling normalization method for differential expression analysis of RNA-seq data. Genome Biology, 11(3), R25. doi:10.1186/gb-2010-11-3-r25
Chen Y, Chen L, Lun ATL, Baldoni P, Smyth GK (2025). edgeR v4: powerful differential analysis of sequencing data with expanded functionality and improved support for small counts and larger datasets. Nucleic Acids Research, 53(2), gkaf018. doi:10.1093/nar/gkaf018
Law CW, Chen Y, Shi W, Smyth GK (2014). voom: precision weights unlock linear model analysis tools for RNA-seq read counts. Genome Biology, 15(2), R29. doi:10.1186/gb-2014-15-2-r29
Liu R, Holik AZ, Su S, Jansz N, Chen K, Leong HS, Blewitt ME, Asselin-Labat ML, Smyth GK, Ritchie ME (2015). Why weight? Modelling sample and observational level variability improves power in RNA-seq analyses. Nucleic Acids Research, 43(15), e97. doi:10.1093/nar/gkv412
Zhang Y, Parmigiani G, Johnson WE (2020). ComBat-seq: batch effect adjustment for RNA-seq count data. NAR Genomics and Bioinformatics, 2(3), lqaa078. doi:10.1093/nargab/lqaa078
se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) tidySE(se0, group = "cell", block = "dex")se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) tidySE(se0, group = "cell", block = "dex")
Tidy a single contrast's DGE stats into a tibble for downstream functions
tidyVoom(contrast, se)tidyVoom(contrast, se)
contrast |
|
se |
A SummarizedExperiment object |
A tibble
se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") se %>% augere.de::runVoom(groups = "cell", block = "dex", comparisons = list(c("N61311", "N052611")), assay = "counts", output.dir = tempfile(), save.results = FALSE) %>% magrittr::extract2("results") %>% magrittr::extract2(1) %>% tidyVoom(se)se0 <- augere.de::loadExampleDataset() SummarizedExperiment::rowData(se0)$ID <- rownames(se0) se <- tidySE(se0, group = "cell", block = "dex") se %>% augere.de::runVoom(groups = "cell", block = "dex", comparisons = list(c("N61311", "N052611")), assay = "counts", output.dir = tempfile(), save.results = FALSE) %>% magrittr::extract2("results") %>% magrittr::extract2(1) %>% tidyVoom(se)
A plot of the top GSEA terms from each contrast
topGSEAplot(GSEAlist, n_terms = 2)topGSEAplot(GSEAlist, n_terms = 2)
GSEAlist |
A list of results from GSEA |
n_terms |
Numeric indicating number of terms per a direction from each contrast |
A ggplot2
data(airwayGSEA) topGSEAplot(airwayGSEA)data(airwayGSEA) topGSEAplot(airwayGSEA)