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

Description Usage Arguments Details Value Examples

Description

This is a generic function. When implemented as the S4 method of class NWA, this function creates an interactome before conducting network analysis.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## S4 method for signature 'NWA'
interactome(
  object,
  interactionMatrix = NULL,
  species,
 
    link = "https://downloads.thebiogrid.org/Download/BioGRID/Release-Archive/BIOGRID-3.4.162/BIOGRID-ORGANISM-3.4.162.tab2.zip",
  reportDir = "HTSanalyzerReport",
  genetic = FALSE,
  force = FALSE,
  verbose = TRUE
)

Arguments

object

An NWA object.

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 downloaded. The current version supports one of the following species: "Dm" ("Drosophila_melanogaster"), "Hs" ("Homo_sapiens"), "Rn" ("Rattus_norvegicus"), "Mm" ("Mus_musculus"), "Ce" ("Caenorhabditis_elegans").

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)

Details

This function provides two options to create an interactome for network analysis. The user can either input an interaction matrix including columns 'InteractionType', 'InteractionA' and 'InteractionB', or set 'species', 'link' and 'genetic' to download data set from BioGRID and extract corresponding interactions to build the interactome.

Another way to set up the interactome is to input an igraph object when the NWA object is created (i.e. nwa=NWA(pvalues, phenotypes, interactome)).

Value

In the end, this function will return an updated object with slot 'interactome' as an object of class 'igraph'.

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
library(org.Hs.eg.db)
library(GO.db)
## load data for subnetwork analyses
data(d7)
pvalues <- d7$neg.p.value
names(pvalues) <- d7$id

## input phenotypes if you want to color nodes by it
phenotypes <- as.vector(d7$neg.lfc)
names(phenotypes) <- d7$id

## Example1: create an object of class 'NWA' by inputting an igraph object as the interactome
data(Biogrid_HS_Interactome)
nwa <- NWA(pvalues=pvalues, phenotypes=phenotypes, interactome=Biogrid_HS_Interactome)


## Example2: create an object of class 'NWA' without interactome
nwa <- NWA(pvalues=pvalues, phenotypes=phenotypes)
## create an interactome for nwa by inputting an interaction matrix
data(Biogrid_HS_Mat)
nwa1 <- interactome(nwa, interactionMatrix = Biogrid_HS_Mat, genetic=FALSE)

## Example3: create an object of class 'NWA' without interactome
nwa <- NWA(pvalues=pvalues, phenotypes=phenotypes)
## Not run: 
## create an interactome for nwa by downloading for BioGRID database
nwa1 <- interactome(nwa, species="Hs", reportDir="HTSanalyzerReport", genetic=FALSE)

## End(Not run)

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