analyzeNwaTS: Subnetwork analysis for Time-series data

Description Usage Arguments Value See Also Examples

View source: R/nwaTS.R

Description

For each NWA object in 'nwaList', this function will store the subnetwork module identified by BioNet (if species is given, labels of nodes will also be mapped from Entrez IDs to gene symbols), and update information about these results to slot summary of class NWA.

Usage

1
2
3
4
5
6
7
analyzeNwaTS(
  nwaList,
  fdr = 0.001,
  species,
  plotBumModel = FALSE,
  verbose = TRUE
)

Arguments

nwaList

A named list of NWA object.

fdr

A single numeric value specifying the false discovery for the scoring of nodes (see BioNet::scoreNodes and Dittrich et al., 2008 for details)

species

A single character value specifying the species for which the data should be read.

plotBumModel

Boolean value, whether to plot a histogram and qqplot of the p-values with the fitted model.

verbose

A single logical value specifying to display detailed messages (when verbose=TRUE) or not (when verbose=FALSE), default is TRUE.

Value

In the end, this function will return an updated list of NWA objects.

See Also

analyze

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
data(d7, d13, d25)

## generate expInfor to describe the information of time series data
expInfor <- matrix(c("d7", "d13", "d25"), nrow = 3, ncol = 2,
                   byrow = FALSE, dimnames = list(NULL, c("ID", "Description")))

## package pvalueTS into a list of pvalues
datalist <- list(d7, d13, d25)
pvalueTS <- lapply(datalist, function(x){
                   tmp <- as.vector(x$neg.p.value)
                   names(tmp) <- x$id
                   tmp})

## package phenotypeTS into a list of phenotypes if you want to color nodes by it,
## otherwise ignore it!
phenotypeTS <- lapply(datalist, function(x) {
                      tmp <- as.vector(x$neg.lfc)
                      names(tmp) <- x$id
                      tmp})

## create an object of class 'NWABatch' with phenotypes
nwaTS <- NWABatch(expInfor = expInfor, pvalueTS = pvalueTS, phenotypeTS = phenotypeTS)

## preprocess NWABatch
nwaTS1 <- preprocessNwaTS(nwaTS, species="Hs", initialIDs="SYMBOL",
                         keepMultipleMappings=TRUE, duplicateRemoverMethod="max")
## Not run: 
## create an interactome for nwa by downloading for BioGRID database
nwaTS2 <- interactomeNwaTS(nwaTS1, species="Hs", reportDir="HTSanalyzerReport", genetic=FALSE)

## analyze
nwaTS3 <- analyzeNwaTS(nwaTS2, fdr=0.0001, species="Hs")

## End(Not run)

CityUHK-CompBio/HTSanalyzeR2 documentation built on Dec. 3, 2020, 2:35 a.m.