plot_volcano: Plot volcano

plot_volcanoR Documentation

Plot volcano

Description

Plot volcano

Usage

plot_volcano(
  object,
  fit = fits(fdt(object))[1],
  coefs = default_coefs(fdt(object), fit = fit)[1],
  facet = if (is_scalar(fit)) "coef" else c("fit", "coef"),
  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
)

Arguments

object

SummarizedExperiment

fit

'limma', 'lme', 'lm', 'wilcoxon'

coefs

character vector

facet

character vector

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

Value

ggplot object

Examples

# 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', fit = 'limma')                   # single contrast
    plot_volcano(object, coefs = c('t2', 't3'), fit = 'limma')          # multiple contrasts
    plot_volcano(object, coefs = c('t2', 't3'), fit = c('limma', 'lm')) # multiple contrasts and methods

# When nothing passes FDR
    fdt(object) %<>% add_adjusted_pvalues('fdr', fit = 'limma',coefs = 't3')
    object %<>% extract( fdrvec(fdt(object), fit = 'limma', coef = 't3') > 0.05, )
    plot_volcano(object, coefs = 't3', 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('hmbsb'))

bhagwataditya/importomics documentation built on May 1, 2024, 2:01 a.m.