Description Usage Arguments Value Examples
Construct a gene-geneset-graph from the results of a functional enrichment analysis
1 2 3 4 5 6 7 8 9 10 |
res_enrich |
A |
res_de |
A |
annotation_obj |
A |
n_gs |
Integer value, corresponding to the maximal number of gene sets to be included |
gs_ids |
Character vector, containing a subset of |
prettify |
Logical, controlling the aspect of the returned graph object. If TRUE (default value), different shapes of the nodes are returned, based on the node type |
geneset_graph_color |
Character value, specifying which color should be used for the fill of the shapes related to the gene sets. |
genes_graph_colpal |
A vector of colors, also provided with their hex string, to be used as a palette for coloring the gene nodes. If unspecified, defaults to a color ramp palette interpolating from blue through yellow to red. |
An igraph
object to be further manipulated or processed/plotted (e.g.
via igraph::plot.igraph()
or
visNetwork::visIgraph())
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | 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)
ggs <- ggs_graph(res_enrich,
res_de,
anno_df
)
ggs
#' # could be viewed interactively with
# library(visNetwork)
# library(magrittr)
# ggs %>%
# visIgraph() %>%
# visOptions(highlightNearest = list(enabled = TRUE,
# degree = 1,
# hover = TRUE),
# nodesIdSelection = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.