xEnrichD3: Function to visualise enrichment results using a D3 plot

Description Usage Arguments Value Note See Also Examples

View source: R/xEnrichD3.r

Description

xEnrichD3 is supposed to visualise enrichment results using a D3 plot. It returns an object of class "htmlwidget".

Usage

1
2
3
4
5
6
7
8
9
xEnrichD3(
eTerm,
top_num = 10,
FDR.cutoff = 0.05,
type = c("sankey", "force", "radial", "diagonal"),
colormap = "ggplot2",
filename = "xEnrichD3",
...
)

Arguments

eTerm

an object of class "eTerm" or "ls_eTerm". Alterntively, it can be a data frame having all these columns (named as 'group','ontology','name','adjp','zscore')

top_num

the number of the top terms (sorted according to adjp). For the eTerm object, if it is 'auto' (for eTerm), only the significant terms (see below FDR.cutoff) will be displayed

FDR.cutoff

FDR cutoff used to declare the significant terms. By default, it is set to 0.05

type

the D3 type of the plot. It can be "sankey" for sankey network, "force" for force directed network graph, "radial" for radial network and "diagonal" for diagonal network

colormap

short name for the group/ontology colormap

filename

the without-extension part of the name of the output html file. By default, it is 'xEnrichD3'

...

additional graphic parameters used in networkD3::sankeyNetwork, networkD3::forceNetwork, networkD3::radialNetwork and networkD3::diagonalNetwork

Value

an object of class "htmlwidget", appended with an "igraph" object

Note

none

See Also

xEnricherGenes, xEnricherSNPs, xEnrichViewer

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
# Load the library
library(XGR)
RData.location <- "http://galahad.well.ox.ac.uk/bigdata/"

res <- xEnrichD3(eTerm, type="sankey", width=500, height=500)
res <- xEnrichD3(eTerm,type="radial", fontSize=12,
nodeColour="steelblue", nodeStroke="fff")
res
res$ig
ig <- xConverter(res$ig, from='igraph', to='igraph_tree')

# BiocManager::install('webshot')
# webshot::install_phantomjs()
# BiocManager::install('r2d3')
# r2d3::save_d3_png(res, file='xEnrichD3.png', zoom=2)

## End(Not run)

XGR documentation built on Jan. 8, 2020, 5:06 p.m.

Related to xEnrichD3 in XGR...