batch_volcano: Produce volcano plots in batch

View source: R/batch_volcanos.R

batch_volcanoR Documentation

Produce volcano plots in batch

Description

The goal of this function is to take a csv file or a data.frame describing all the volcano plots to produce and launch them in batches.

Usage

batch_volcano(
  volcano_infos,
  de_results,
  add_labels = NULL,
  outdir = NULL,
  r_objects = NULL,
  force = FALSE,
  cores = 1
)

Arguments

volcano_infos

A csv file or a data.frame describing the volcanos to produce.

de_results

A list of DE results where the name of each DE corresponds to the id_de value. Or the outdir directory where the csv files of the batch_de function where saved.

add_labels

A vector of the symbols to show on the volcano plot. If NULL, no symbols will be shown. Default: NULL

outdir

The directory where to save the volcano plots in pdf format. If NULL, the results won't be saved as pdf. The files will be saved as <outdir>/<id_plot>.pdf. Default: NULL.

r_objects

The directory where to save volcano plots in rds format. If NULL, the volcano plots won't be saved as rds files. The files will be saved as <r_objects>/<id_plot>.rds. Default: NULL.

force

Should the files be re-created if they already exists? Default: FALSE.

cores

Number of cores for the volcano creation. Default: 1

Details

The table may contain the following columns, in no specific order: * id_plot: unique identifier for each volcano plot. Mandatory. * id_de: unique identifier for each DE analysis results. Mandatory. Default: TRUE. * y_axis: Column in the DE results to use for the y-axis. "padj" or "pvalue" Default: "padj" * p_threshold: Maximal pvalue or padj to be considered significative. Default: 0.05 * fc_threshold: Minimal fold-change to be considered significative. Default: 1.5 * title: The title of the volcano. Default: NA * show_signif_counts: show the number of up- and down-regulated genes? * show_signif_lines: show lines at the threshold for significance? "none", "vertical","horizontal" or "both". Default: "vertical" * show_signif_color: Show color for significant genes? Default: TRUE * col_up: Color of the up-regulated genes. Default: "#E73426" * col_down: Color of the down-regulated genes. Default: "#0020F5" * size: The point size. Default: 3

Value

Invisibly returns a list of all the volcano plots.

Examples

## Not run: 
# First launch batch_de
de_infos <- get_demo_de_infos_file()
txi <- get_demo_txi()
design <- get_demo_design()
de_list <- batch_de(de_infos, txi, design)
# Then do the volcano_batch
volcano_infos <- get_demo_volcano_infos_file()
volcano_list <- batch_volcano(volcano_infos, de_list)

## End(Not run)


CharlesJB/rnaseq documentation built on Oct. 17, 2023, 5:37 p.m.