BarGraphDEGRE {DEGRE}R Documentation

Create a bar plot showing the number of downregulated and upregulated genes.

Description

Create a bar plot showing the number of downregulated and upregulated genes.

Usage

BarGraphDEGRE(
  results,
  log2FC_cutoff = 1,
  downregulated_color = "coral2",
  upregulated_color = "cornflowerblue",
  xlab = "Regulation",
  ylab = "Number of genes",
  font.x = 10,
  font.y = 10,
  font.tickslab = 10,
  legend_position = "right",
  legend.title = "Regulation"
)

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.

downregulated_color

the bar color related to the number of downregulated genes. The default is "coral2".

upregulated_color

the bar color related to the number of upregulated genes. The default is "cornflowerblue".

xlab

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

ylab

the y lab text. The default is "Number of genes".

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.

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".

Value

No return value, called for side effects

Examples

# Reading a CSV file for an example:
dir <- system.file("extdata", package = "DEGRE")
results_DEGRE_example <- read.csv(file.path(dir,"results_DEGRE_example.csv"))
# Running the BarGraphDEGRE function
BarGraphDEGRE(results = results_DEGRE_example,
           log2FC_cutoff = 1,
           downregulated_color = "coral2",
           upregulated_color = "cornflowerblue",
           xlab = "Regulation",
           ylab = "Number of genes",
           font.x = 10,
           font.y = 10,
           font.tickslab = 10,
           legend_position = "right",
           legend.title = "Regulation")


[Package DEGRE version 0.2.0 Index]