plot_taco: Taco Plot

View source: R/plot_taco.R

plot_tacoR Documentation

Taco Plot

Description

This function plots effect size against significance against probewise means for a given test of differential expression.

Usage

plot_taco(dat, fdr = 0.05, title = "Taco Plot", legend = "right")

Arguments

dat

Data frame representing the results of a test for differential expression, such as the output of a call to limma::topTable, edgeR::topTags, or DESeq2::results. Alternatively, any object coercable to a data frame with columns for log fold changes, probewise means, p-values, and FDR. Missing values are silently removed.

fdr

Significance threshold for declaring a probe differentially expressed.

title

Optional plot title.

legend

Legend position. Must be one of "bottom", "left", "top", "right", "bottomright", "bottomleft", "topleft", or "topright".

Details

A taco plot combines the elements of a volcano plot and an MD plot into a single three-dimensional figure. Points are colored to distinguish between those that do and do not meet a user-defined FDR threshold. These figures help to evaluate the symmetry, magnitude, and significance of effects in an omic experiment.

Examples

library(limma)
DE_genes <- cbind(matrix(rnorm(50 * 5, mean = 5), nrow = 50, ncol = 5),
                  matrix(rnorm(50 * 5), nrow = 50, ncol = 5))
eset <- rbind(DE_genes, matrix(rnorm(4950 * 10), nrow = 4950, ncol = 10))
treat <- rep(c("A", "B"), each = 5)
des <- model.matrix(~ treat)
fit <- eBayes(lmFit(eset, des))
top <- topTable(fit, number = Inf)
plot_taco(top)


dswatson/bioplotr documentation built on March 3, 2023, 9:43 p.m.