View source: R/do_VolcanoPlot.R
do_VolcanoPlot | R Documentation |
Compute a Volcano plot out of DE genes.
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,
add_tag_side = "both",
order_tags_by = "both",
tag_size = 6,
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"
)
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 |
|
add_tag_side |
|
order_tags_by |
|
tag_size |
|
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 |
|
A volcano plot as a ggplot2 object.
# 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()`.")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.