plot_volcano | R Documentation |
Plot volcano
plot_volcano(
object,
fit = fits(object)[1],
coefs = setdiff(autonomics::coefs(object, fit = fit), "Intercept")[1],
facet = if (is_scalar(fit)) "coef" else c("fit", "coef"),
scales = "fixed",
shape = if ("imputed" %in% fvars(object)) "imputed" else NULL,
size = NULL,
alpha = NULL,
label = "feature_id",
max.overlaps = 10,
features = NULL,
nrow = length(fit),
p = 0.05,
fdr = 0.05,
xndown = NULL,
xnup = NULL,
title = NULL
)
object |
SummarizedExperiment |
fit |
'limma', 'lme', 'lm', 'wilcoxon' |
coefs |
character vector |
facet |
character vector |
scales |
'free', 'fixed', etc. |
shape |
fvar (string) |
size |
fvar (string) |
alpha |
fvar (string) |
label |
fvar (string) |
max.overlaps |
number: passed to ggrepel |
features |
feature ids (character vector): features to encircle |
nrow |
number: no of rows in plot |
p |
number: p cutoff for labeling |
fdr |
number: fdr cutoff for labeling |
xndown |
x position of ndown labels |
xnup |
x position of nup labels |
title |
string or NULL |
ggplot object
# Regular Usage
file <- system.file('extdata/atkin.metabolon.xlsx', package = 'autonomics')
object <- read_metabolon(file)
object %<>% fit_limma()
object %<>% fit_lm()
plot_volcano(object, coefs = 't3-t0', fit = 'limma') # single contrast
plot_volcano(object, coefs = c('t2-t0', 't3-t0'), fit = 'limma') # multip contrasts
plot_volcano(object, coefs = c('t2-t0', 't3-t0'), fit = c('limma', 'lm')) # multip contrs & methods
# When nothing passes FDR
fdt(object) %<>% add_adjusted_pvalues('fdr', fit = 'limma',coefs = 't3-t0')
object %<>% extract( fdrvec(object, fit = 'limma', coef = 't3-t0') > 0.05, )
plot_volcano(object, coefs = 't3-t0', fit = 'limma')
# Additional mappings
file <- system.file('extdata/fukuda20.proteingroups.txt', package = 'autonomics')
object <- read_maxquant_proteingroups(file, impute = TRUE)
object %<>% fit_limma()
plot_volcano(object)
plot_volcano(object, label = 'gene')
plot_volcano(object, label = 'gene', size = 'log2maxlfq')
plot_volcano(object, label = 'gene', size = 'log2maxlfq', alpha = 'pepcounts')
plot_volcano(object, label = 'gene', features = c('Q503D2_DANRE'))
plot_volcano(object, label = 'gene', features = list(c('Q503D2_DANRE', 'Q6DGK4_DANRE'),
c('Q6DGK4_DANRE', 'F1Q7L0_DANRE')))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.