volcano | R Documentation |
Generates a volcano plot in order to visualize the differentially expressed genes. The plot is highly customizable.
volcano(
log2FC_data,
padj_data,
FC_t = 1.5,
p_t = 0.05,
FC_unresponsive_rigth = 1.1,
FC_unresponsive_left = 1/FC_unresponsive_rigth,
x_ends = NULL,
y_min = 0,
y_max = NULL,
left_label = "UP",
right_label = "DOWN",
unresponsive_label = "NoResp",
null_label = "NULL",
names = as.character(c(1:length(log2FC_data))),
left_names = FALSE,
right_names = FALSE,
padding = FALSE,
names_size = 10,
print_plot = F,
left_color = "#00BA38",
right_color = "#F8766D",
unresponsive_color = "#00A5CF",
null_color = "gray30",
point_size = 0.5,
legend = TRUE,
legend_title = "Expression status",
x_label = bquote("log"["2"] * "(Fold Change expression)"),
y_label = bquote("-log"["10"] * "(p-value"["adjusted"] * ")"),
title = "Volcano plot",
sub_title = NULL,
add_threshold_lines = T,
threshold_line_color = "gray70",
threshold_line_type = "dotted",
font_family = "Helvetica",
font_size = 12
)
log2FC_data |
Numeric vector containing the log2(FoldChange) values of each gene. |
padj_data |
Numeric vector of p-values. Use of adjusted p-values is recommended. |
FC_t |
Value of the threshold to use for the fold change expression to define differentially expressed genes, expressed as linear value. By default 1.5 and by consequence 1/1.5. |
p_t |
Value of the threshold to use for the p-values to define differentially expressed genes, expressed as linear value. By default 0.05. |
FC_unresponsive_rigth |
Value of the threshold to use for the fold change expression to define unresponsive genes when |
FC_unresponsive_left |
Value of the threshold to use for the fold change expression to define unresponsive genes when |
x_ends |
Numeric positive value to define manually the range of the X-axis: it will be calculated as |
y_min |
Numeric value for the minimum value of the Y-axis. By default 0. Set it to |
y_max |
Numeric value for the maximum value of the Y-axis. By default |
left_label |
String to indicate the label to use for the set of genes in the left side of the graph (those with |
right_label |
String to indicate the label to use for the set of genes in the right side of the graph (those with |
unresponsive_label |
String to indicate the label to use for the set of unresponsive genes (those with |
null_label |
String to indicate the label to use for the set of null genes (those with |
names |
String vector with the names to be plotted if required, eg. gene names. By default |
left_names |
Logic value to indicate if to print the set of differentially expressed genes in the left side of the graph (those with |
right_names |
Logic value to indicate if to print the set of differentially expressed genes in the right side of the graph (those with |
padding |
Logic value to indicate if to plot the padding around the names of genes. By default |
names_size |
Numeric value to define de size of the point names size. By default 10. |
print_plot |
Logic value to define whether to print the volcano plot once created. By default |
left_color |
String to indicate the color to use for the set of genes in the left side of the graph (those with |
right_color |
String to indicate the color to use for the set of genes in the right side of the graph (those with |
unresponsive_color |
String to indicate the color to use for the set of unresponsive genes (those with |
null_color |
String to indicate the color to use for the set of null genes (those with |
point_size |
Numeric value to define de size of the points. By default 0.5. |
legend |
Logic value to define if to print the legend. By default |
legend_title |
A string to indicate the label of the legend title. By default |
x_label |
A string to indicate the X-axis label. By default |
y_label |
A string to indicate the Y-axis label. By default |
title |
A string to indicate the title of the plot. By default |
sub_title |
A string to indicate the subtitle of the plot. By default |
add_threshold_lines |
Logic value to define if lines for the thresholds, both FC and p.value, should be plotted. By default |
threshold_line_color |
String to define the color of the threshold lines. By default |
threshold_line_type |
String or numeric value to define the threshold lines type. Both numeric and string standard R codes are accepted. By default |
font_family |
String to define the font family to use in the plot writings. By default |
font_size |
Numeric value to define the font size. By default 12. |
A plot in ggplot2 format.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.