plotVolcano: Create volcano plot for Wilcoxon test result

View source: R/visualization.R

plotVolcanoR Documentation

Create volcano plot for Wilcoxon test result

Description

plotVolcano is a simple implementation and shares most of arguments with other rliger plotting functions. plotEnhancedVolcano is a wrapper function of EnhancedVolcano::EnhancedVolcano(), which has provides substantial amount of arguments for graphical control. However, that requires the installation of package "EnhancedVolcano".

highlight and labelTopN both controls the feature name labeling, whereas highlight is considered first. If both are as default (NULL), all significant features will be labeled.

Usage

plotVolcano(
  result,
  group = NULL,
  logFCThresh = 1,
  padjThresh = 0.01,
  highlight = NULL,
  labelTopN = NULL,
  dotSize = 2,
  dotAlpha = 0.8,
  legendPosition = "top",
  labelSize = 4,
  ...
)

Arguments

result

Data frame table returned by runMarkerDEG or runPairwiseDEG.

group

Selection of one group available from result$group. If only one group is available from result, default NULL uses it.

logFCThresh

Number for the threshold on the absolute value of the log2 fold change statistics. Default 1.

padjThresh

Number for the threshold on the adjusted p-value statistics. Default 0.01.

highlight

A character vector of feature names to be highlighted. Default NULL.

labelTopN

Number of top differential expressed features to be labeled on the top of the dots. Ranked by adjusted p-value first and absolute value of logFC next. Default NULL.

dotSize, dotAlpha

Numbers for universal aesthetics control of dots. Default 2 and 0.8.

legendPosition

Text indicating where to place the legend. Choose from "top", "bottom", "left" or "right". Default "top".

labelSize

Size of labeled top features and line annotations. Default 4.

...

Arguments passed on to .ggScatter, .ggplotLigerTheme

dotOrder

Controls the order that each dot is added to the plot. Choose from "shuffle", "ascending", or "descending". Default "shuffle", useful when coloring by categories that overlaps (e.g. "dataset"), "ascending" can be useful when coloring by a continuous variable (e.g. gene expression) where high values needs more highlight. NULL use default order.

raster

Logical, whether to rasterize the plot. Default NULL automatically rasterize the plot when number of total dots to be plotted exceeds 100,000.

labelText

Logical, whether to show text label at the median position of each categorical group specified by colorBy. Default TRUE. Does not work when continuous coloring is specified.

labelTextSize

Numeric, controls the size of label size when labelText = TRUE. Default 4.

seed

Random seed for reproducibility. Default 1.

legendColorTitle

Legend title text for color aesthetics, often used for categorical or continuous coloring of dots. Default NULL shows the original variable name.

showLegend

Whether to show the legend. Default TRUE.

baseSize

One-parameter control of all text sizes. Individual text element sizes can be controlled by other size arguments. "Title" sizes are 2 points larger than "text" sizes when being controlled by this.

titleSize,xTitleSize,yTitleSize,legendTitleSize

Size of main title, axis titles and legend title. Default NULL controls by baseSize + 2.

subtitleSize,xTextSize,yTextSize,legendTextSize

Size of subtitle text, axis texts and legend text. Default NULL controls by baseSize.

panelBorder

Whether to show rectangle border of the panel instead of using ggplot classic bottom and left axis lines. Default FALSE.

Value

ggplot

Examples

plotVolcano(deg.pw, "0.stim")

rliger documentation built on Oct. 30, 2024, 1:07 a.m.