Skip to contents

Plot MA-plot for a differential test result out from test_diff().

Usage

plot_ma_RNA(
  x,
  contrast = get_contrast(x)[1],
  point_alpha = 0.2,
  sig_color = "red3",
  hlines = NULL,
  title = contrast,
  xlab = "mean of normalized counts - log10 scale",
  ylim = NULL,
  add_rug = FALSE,
  intgenes = NULL,
  intgenes_color = "steelblue4",
  intgenes_size = 3,
  label_fontsize = 3,
  labels_repel = FALSE
)

Arguments

x

DEGdata object, Test result for which differentially expressed/enriched proteins or genes are annotated (output from test_diff()).

contrast

Character. Only plot on certain contrasts.

point_alpha

Numeric(1), between 0 to 1, transparency value for the points (0 = transparent, 1 = opaque)

sig_color

Charecter(1), Color to use to mark differentially expressed genes. Defaults to red

hlines

Numeric(1), The y coordinate (in absolute value) where to draw horizontal lines, optional

title

A title for the plot, optional

xlab

X axis label, defaults to "mean of normalized counts - log10 scale"

ylim

Vector of two numeric values, Y axis limits to restrict the view.

add_rug

Logical, whether to add rug plots in the margins

intgenes

Vector of genes of interest, highlighted on plot by intgenes_color. Gene symbols if a symbol column is provided in x, or else the identifiers specified in the row names

intgenes_color

Character(1), The color to use to mark the genes on the main plot.

intgenes_size

The point size of intgenes.

label_fontsize

Numeric(1), The fontsize of labels_intgenes

labels_repel

Logical, whether to use geom_text_repel for placing the labels on the features to mark

labels_intgenes

Logical, whether to add the gene identifiers/names close to the marked plots.

Value

A ggplot object