plot_WGCNA_module_volcano_nvars: Generate a set of volcano plot of genes from WGCNA modules...

Description Usage Arguments Details

Description

Generate a set of volcano plot of genes from a differential expression (limma) analysis, for one or more contrastst, with point inclusion and color based on membership in modules from a WGCNA analysis. These plots can be output to a plotting window, or to a pdf. Points can be selected for inclusion based on their connectivity to the module eigengene (kME). Points can be labeled with gene names, and the points to be labeled can be set based on an ellipse oriented to the x- and y-axes.

Usage

1
2
3
4
5
6
7
plot_WGCNA_module_volcano_nvars(
     topGenes.pairwise, gene_modules,
     file_prefix=NULL, plotdims=c(9,9),
     kME_cut=0.75, fc_cut=log2(1.5), p_cut=0.01,
     x_lim=NULL, y_lim=NULL,
     gene_labs=FALSE, x_cut=0, y_cut=0,
     point_order="random")

Arguments

topGenes.pairwise

a list of data frames, each typically containing the output of a call to topTable for a single contrast. Each list element should be named with an identifier for the contrast, and must contain genes, log2 fold-change, and adjusted p-values.

gene_modules

a data frame containing the gene module memberships. Must contain, at minimum, columns for gene, color_assigned, and kME_color_assigned. If provided, the function outputs a pdf of the plot, named "file_prefix.pdf".

plotdims

a numeric vector, the size (in inches) of the plotting object. Either the size of the pdf, or the size of the plotting window.

fc_cut

numeric, the (absolute value) log2 fold-change threshold for determining significance of genes. This value is also plotted as vertical dotted lines.

p_cut

numeric, the p-value threshold for determining significance of genes. This value is also plotted as a horizontal dotted line.

x_lim, y_lim

numeric vectors, the lower and upper limits of the plotting space along the x- and y-axes. Passed to ggplot2::xlim.

gene_labs

logical, whether to include gene labels for genes with extreme logFC and p-value. If TRUE, genes with values outside the labeling ellipse will be labeled.

x_cut, y_cut

numeric, the radii of the labeling ellipse along the x- and y-axes. Genes with values outside the ellipse are labeled with gene names. Default to 0, which results in all genes being labeled.

point_order

character string, specifying how to order the points. Currently accepted values are "random", which randomizes the order of the points, and "input", which send the points to ggplot as they are in the input data frame. Defaults to "random".

Details

A separate plot is generated for element of topGenes.pairwise. Genes with kME_color_assigned > kME_cut are plotted. Colors of points are determined by the values of color_assigned; if different colors are preferred, these values must be modified prior to calling plot_WGCNA_module_volcano_2var.


mjdufort/comboVisTools documentation built on May 14, 2019, 10:30 p.m.