gs_volcano {GeneTonic} | R Documentation |
Volcano plot for gene sets, to summarize visually the functional enrichment results
gs_volcano( res_enrich, p_threshold = 0.05, color_by = "aggr_score", volcano_labels = 10, scale_circles = 1, gs_ids = NULL, plot_title = NULL )
res_enrich |
A |
p_threshold |
Numeric, defines the threshold to be used for filtering the gene sets to display. Defaults to 0.05 |
color_by |
Character specifying the column of |
volcano_labels |
Integer, maximum number of labels for the gene sets to be plotted as labels on the volcano scatter plot. |
scale_circles |
A numeric value, to define the scaling factor for the circle sizes. Defaults to 1. |
gs_ids |
Character vector, containing a subset of |
plot_title |
Character string, used as title for the plot. If left |
It is also possible to reduce the redundancy of the input res_enrich
object,
if it is passed in advance to the gs_simplify()
function.
A ggplot
object
gs_simplify()
can be applied in advance to res_enrich
to reduce
the redundancy of the displayed gene sets
library("macrophage") library("DESeq2") library("org.Hs.eg.db") library("AnnotationDbi") # dds object data("gse", package = "macrophage") dds_macrophage <- DESeqDataSet(gse, design = ~line + condition) rownames(dds_macrophage) <- substr(rownames(dds_macrophage), 1, 15) dds_macrophage <- estimateSizeFactors(dds_macrophage) # annotation object anno_df <- data.frame( gene_id = rownames(dds_macrophage), gene_name = mapIds(org.Hs.eg.db, keys = rownames(dds_macrophage), column = "SYMBOL", keytype = "ENSEMBL"), stringsAsFactors = FALSE, row.names = rownames(dds_macrophage) ) # res object data(res_de_macrophage, package = "GeneTonic") res_de <- res_macrophage_IFNg_vs_naive # res_enrich object data(res_enrich_macrophage, package = "GeneTonic") res_enrich <- shake_topGOtableResult(topgoDE_macrophage_IFNg_vs_naive) res_enrich <- get_aggrscores(res_enrich, res_de, anno_df) gs_volcano(res_enrich)