Learn R Programming

DEGRE (version 0.2.0)

VolcanoDEGRE: Create a volcano plot to visualize the proportion of downregulated and upregulated genes by applying a log2FC cutoff.

Description

Create a volcano plot to visualize the proportion of downregulated and upregulated genes by applying a log2FC cutoff.

Usage

VolcanoDEGRE(
  results,
  log2FC_cutoff = 1,
  padj = 0.05,
  font.x = 10,
  font.y = 10,
  font.tickslab = 10,
  downregulated_color = "coral2",
  upregulated_color = "cornflowerblue",
  xlab = "log2Foldchange",
  ylab = "-log10(P-value)",
  legend_position = "right",
  legend.title = "Regulation"
)

Value

No return value, called for side effects

Arguments

results

a data.frame object. It receives the output of the DEGRE function, filtered or not, as input.

log2FC_cutoff

it stores the cutoff of the log2FoldChange. The default is 1.

padj

it stores the cutoff of the P-adjusted value (Q-value). The default is 0.05.

font.x

the font size of the x axis. The default is 10.

font.y

the font size of the y axis. The default is 10.

font.tickslab

the font size of the ticks lab. The default is 10.

downregulated_color

the colors of the downregulated genes. The default is "coral2".

upregulated_color

the colors of the upregulated genes. The default is "cornflowerblue".

xlab

the x lab text. The default is "log2Foldchange".

ylab

the y lab text. The default is "-log10(P-value)".

legend_position

you need to specify here the position of the legend. The default is "right".

legend.title

the title of the legend. The default is "Regulation".

Examples

Run this code
dir <- system.file("extdata", package = "DEGRE")
results_DEGRE_example <- read.csv(file.path(dir,"results_DEGRE_example.csv"))
# Running the VolcanoDEGRE function
VolcanoDEGRE(results = results_DEGRE_example,
          log2FC_cutoff = 1,
          padj = 0.05,
          font.x = 10,
          font.y = 10,
          font.tickslab = 10,
          downregulated_color = "coral2",
          upregulated_color = "cornflowerblue",
          xlab = "log2Foldchange",
          ylab = "-log10(P-value)",
          legend_position = "right",
          legend.title = "Regulation")

Run the code above in your browser using DataLab