plot_ma_de: Make a pretty MA plot from one of limma, deseq, edger, or...

View source: R/de_plots.R

plot_ma_deR Documentation

Make a pretty MA plot from one of limma, deseq, edger, or basic.

Description

Because I can never remember, the following from wikipedia: "An MA plot is an application of a Bland-Altman plot for visual representation of two channel DNA microarray gene expression data which has been transformed onto the M (log ratios) and A (mean average) scale."

Usage

plot_ma_de(
  table,
  expr_col = "logCPM",
  fc_col = "logFC",
  p_col = "qvalue",
  pval = 0.05,
  alpha = 0.4,
  logfc = 1,
  label_numbers = TRUE,
  size = 2,
  shapes = TRUE,
  invert = FALSE,
  label = NULL,
  label_column = "hgncsymbol",
  ...
)

Arguments

table

Df of linear-modelling, normalized counts by sample-type,

expr_col

Column showing the average expression across genes.

fc_col

Column showing the logFC for each gene.

p_col

Column containing the relevant p values.

pval

Name of the pvalue column to use for cutoffs.

alpha

How transparent to make the dots.

logfc

Fold change cutoff.

label_numbers

Show how many genes were 'significant', 'up', and 'down'?

size

How big are the dots?

shapes

Provide different shapes for up/down/etc?

invert

Invert the ma plot?

label

Label the top/bottom n logFC values?

label_column

gene annotation column from which to extract labels.

...

More options for you

Value

ggplot2 MA scatter plot. This is defined as the rowmeans of the normalized counts by type across all sample types on the x axis, and the log fold change between conditions on the y-axis. Dots are colored depending on if they are 'significant.' This will make a fun clicky googleVis graph if requested.

See Also

[limma_pairwise()] [deseq_pairwise()] [edger_pairwise()] [basic_pairwise()]

Examples

 ## Not run: 
  plot_ma(voomed_data, table)
  ## Currently this assumes that a variant of toptable was used which
  ## gives adjusted p-values.  This is not always the case and I should
  ## check for that, but I have not yet.
 
## End(Not run)

elsayed-lab/hpgltools documentation built on May 9, 2024, 5:02 a.m.