do_VolcanoPlot {SCpubr} | R Documentation |
Compute a Volcano plot out of DE genes.
Description
Compute a Volcano plot out of DE genes.
Usage
do_VolcanoPlot(
sample,
de_genes,
pval_cutoff = 0.05,
FC_cutoff = 2,
pt.size = 2,
border.size = 1.5,
border.color = "black",
font.size = 14,
font.type = "sans",
plot.title = NULL,
plot.subtitle = NULL,
plot.caption = NULL,
plot_lines = TRUE,
line_color = "grey75",
line_size = 0.5,
add_gene_tags = TRUE,
order_tags_by = "both",
n_genes = 5,
use_labels = FALSE,
colors.use = "steelblue",
plot.title.face = "bold",
plot.subtitle.face = "plain",
plot.caption.face = "italic",
axis.title.face = "bold",
axis.text.face = "plain",
legend.title.face = "bold",
legend.text.face = "plain"
)
Arguments
sample |
|
de_genes |
|
pval_cutoff |
|
FC_cutoff |
|
pt.size |
|
border.size |
|
border.color |
|
font.size |
|
font.type |
|
plot.title , plot.subtitle , plot.caption |
|
plot_lines |
|
line_color |
|
line_size |
|
add_gene_tags |
|
order_tags_by |
|
n_genes |
|
use_labels |
|
colors.use |
|
plot.title.face , plot.subtitle.face , plot.caption.face , axis.title.face , axis.text.face , legend.title.face , legend.text.face |
|
Value
A volcano plot as a ggplot2 object.
Examples
# Check Suggests.
value <- SCpubr:::check_suggests(function_name = "do_VolcanoPlot", passive = TRUE)
if (isTRUE(value)){
# Consult the full documentation in https://enblacar.github.io/SCpubr-book/
# Define your Seurat object.
sample <- readRDS(system.file("extdata/seurat_dataset_example.rds", package = "SCpubr"))
# Retrieve DE genes.
de_genes <- readRDS(system.file("extdata/de_genes_example.rds", package = "SCpubr"))
# Generate a volcano plot.
p <- SCpubr::do_VolcanoPlot(sample = sample,
de_genes = de_genes)
p
} else if (base::isFALSE(value)){
message("This function can not be used without its suggested packages.")
message("Check out which ones are needed using `SCpubr::state_dependencies()`.")
}