View source: R/plot_volcano_2var.R
Generate a volcano plot of genes from a differential expression (limma) analysis. This plot can be output to a plotting window, or to a pdf. The points can be colored based on fold-change and p-value thresholds. Points can also 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.
1 2 3 4 5 6 7 8 |
topGenes |
a data frame, typically the output of a call to |
my_cols |
a vector of colors for plotting points. If |
file_prefix |
a character string. 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. |
color_by_threshold |
logical, whether to color points based on exceeding a threshold for logFC and p-value. Used only if fc_cut and p_cut are not NULL. |
fc_cut |
numeric, the (absolute value) log2 fold-change threshold for determining significance of genes. This value is also plotted as vertical dotted lines. Setting to NULL removes the lines. |
p_cut |
numeric, the p-value threshold for determining significance of genes. This value is also plotted as a horizontal dotted line. Setting to NULL removes the lines. |
x_lim, y_lim |
either "auto", NULL, or numeric vectors. If "auto", x- and y-limits are determined from the data using |
gene_labs |
character, the type of gene labeling to include. If |
x_cut, y_cut |
numeric. Interpretation depends on the value of |
x_cut_direction |
character. For threshold-based gene labeling only, specifies the direction of the threshold for gene labeling. Default to "both", which labels genes with absolute value logFC greater than x_cut. "lower" labels genes with logFC less than x_cut; "upper" labels genes with logFC greater than x_cut. |
gene_labs_repel |
logical, whether to force separation of the gene label text. If TRUE, labels are plotted using |
gene_lab_size |
numeric, the size of the gene label text. Passed to |
... |
additional parameters passed to |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.