interactomeNwaTS: Create an interactome from BioGRID database or input custom...

Description Usage Arguments Value See Also Examples

View source: R/nwaTS.R

Description

This function creates an interactome before conducting network analysis for Time-series data. Different from interactome which can either be performed before preprocess or after preprocess, this method must be performed after preprocessNwaTS.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
interactomeNwaTS(
  nwaList,
  interactionMatrix = NULL,
  species,
 
    link = "http://thebiogrid.org/downloads/archives/Release%20Archive/BIOGRID-3.4.138/BIOGRID-ORGANISM-3.4.138.tab2.zip",
  reportDir = "HTSanalyzerReport",
  genetic = FALSE,
  force = FALSE,
  verbose = TRUE
)

Arguments

nwaList

A named list of NWA object generated by preprocessNwaTS.

interactionMatrix

An interaction matrix including columns 'InteractionType', 'InteractorA' and 'InteractorB'. If this matrix is available, the interactome can be directly built based on it instead of downloading from BioGRID.

species

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

link

the link (url) where the data should be downloaded (in tab2 format). The default link is version 3.4.138 of BioGRID.

reportDir

A single character value specifying the directory to store reports. The BioGRID data set will be downloaded and stored in a subdirectory called 'Data' in 'reportDir'.

genetic

A single logical value. If TRUE, genetic interactions will be kept; otherwise, they will be removed from the data set.

force

Force to download the data set.

verbose

A single logical value indicating to display detailed messages (when verbose=TRUE) or not (when verbose=FALSE).

Value

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

See Also

interactome

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
37
38
39
40
41
42
43
44
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})

## Example1: create an object of class 'NWABatch' by inputting an igraph object as the interactome
data(Biogrid_HS_Interactome)
nwaTS <- NWABatch(expInfor = expInfor, pvalueTS = pvalueTS,
                 phenotypeTS = phenotypeTS, interactome = Biogrid_HS_Interactome)

## Example2: create an object of class 'NWABatch' without interactome
nwaTS <- NWABatch(expInfor = expInfor, pvalueTS = pvalueTS, phenotypeTS = phenotypeTS)
## preprocess nwaTS
nwaTS1 <- preprocessNwaTS(nwaTS, species="Hs", initialIDs="SYMBOL",
                         keepMultipleMappings=TRUE, duplicateRemoverMethod="max")
## create an interactome for NWABatch by inputting an interaction matrix
data(Biogrid_HS_Mat)
nwaTS2 <- interactomeNwaTS(nwaTS1, interactionMatrix = Biogrid_HS_Mat, genetic=FALSE)

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

## End(Not run)

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