reportAll: Write HTML reports for both enrichment and network analyses

Description Usage Arguments Value Examples

View source: R/gsca_report.R

Description

This function can create shiny reports for both gene sets enrichment analysis and network analysis.

Usage

1
2
reportAll(gsca = NULL, nwa = NULL, TSOrder = NULL,
  specificGeneset = NULL, cutoff = NULL, reportDir = "AnalysisReport")

Arguments

gsca

A analyzed GSCA object or a list of analyzed GSCA objects.

nwa

An NWA object or a list of NWA objects.

TSOrder

A character specifying the visulization order of 'Time Series' data in shiny report. Only works when reporting for 'Time Series' data, default is the ID order in 'expInfor'.

specificGeneset

A named list of specific gene sets. See viewEnrichMap,GSCA-method for details.

cutoff

A numeric value between 0 and 1. This parameter is setted as a cutoff of edge weight in the enrichment map for better visualization. When the edge weight, namely the Jaccard coefficient between two gene sets, is less than this cutoff, this edge would not be showed in the enrichment map.

reportDir

A single character value specifying the directory to store reports. For default both the enrichment analysis and network analysis reports will be stored in the directory called "AnalysisReport".

Value

In the end, this function would generate a html report.

Examples

 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
## Not run: 
## load data
data(d7_gsca, d7_nwa, gscaTS, nwaTS)

## Example1: report both gsca and nwa
reportAll(gsca=d7_gsca, nwa=d7_nwa)

## Example2: report gscaTS
reportAll(gsca=gscaTS)

## Example3: report nwaTS
reportAll(nwa=nwaTS)

## Example4: report both gscaTS and nwaTS
reportAll(gsca=gscaTS, nwa=nwaTS)

## Example5: change order for time series data
reportAll(gsca=gscaTS, TSOrder=names(gscaTS)[c(3, 1, 2)])
reportAll(nwa=nwaTS, TSOrder=names(nwaTS)[c(3, 2, 1)])

## Example6: view specificGeneset enrichment map for gscaTS using reportAll
library(igraph)
## As told previously, specificGeneset needs to be a subset of all analyzed gene sets
## which can be roughly gotten by:
tmp <- getTopGeneSets(gscaTS[[1]], resultName = "GSEA.results",
                      gscs=c("GO_BP"), ntop = 20000, allSig = FALSE)
## In that case, we can define specificGeneset as below:
GO_BP_geneset <- tmp$GO_BP[c(4:10, 20:30)]
## the name of specificGenesets also needs to match with the names of tmp
specificGeneset <- list("GO_BP"=GO_BP_geneset)
reportAll(gsca=gscaTS, specificGeneset=specificGeneset)

## Example7: report gscaTS using a cutoff to filter away edges with small weight
reportAll(gsca=gscaTS, cutoff = 0.03)

## End(Not run)

CityUHK-CompBio/HTSanalyzeR2 documentation built on Aug. 28, 2018, 1:19 a.m.