pathway2Graph: This function generates a directed graph from all the...

Description Usage Arguments Value Author(s) Examples

Description

This function generates a directed graph from all the interactions of a specified pathway in a biopax model. Edges with no direction are indicated by a 0 weight.

Usage

1
2
3
pathway2Graph(biopax, pwid, expandSubpathways = TRUE,
  splitComplexMolecules = FALSE, useIDasNodenames = TRUE, verbose = FALSE,
  withDisconnectedParts = TRUE)

Arguments

biopax

A biopax model

pwid

string

expandSubpathways

logical. If TRUE subpathways are expanded into this graph, otherwise only this very pathway is used.

splitComplexMolecules

logical. If TRUE every complex is split up into its components. This leads to splitting a single node with name of the complex into several nodes with names of the components, these components all have identical edges. Default value is FALSE

useIDasNodenames

logical. If TRUE nodes of the graph are named by their molecule IDs instead of using the NAME property. This can help with badly annotated/formatted databases.

verbose

logical

withDisconnectedParts

logical. If TRUE the pathway graph is returned as such, else only the largest connected component is given back

Value

Returns the a graph object of the specified pathway. Edges with no direction are indicated by a 0 weight.

Author(s)

Nirupama Benis

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 # load data
data(biopaxLevel3Example) # location of the data
pwid <- "Pathway1019"
# build pathway using pathway2Graph
pathwayAsGraph <- pathway2Graph(biopax = biopaxLevel3Example, pwid = pwid, splitComplexMolecules = FALSE, useIDasNodenames = TRUE, verbose = FALSE, withDisconnectedParts = TRUE)
pathwayAsGraph # should have 23 nodes, 24 edges
plotRegulatoryGraph(pathwayAsGraph)
# build pathway discarding the disconnected parts of the graph
pathwayAsGraph <- pathway2Graph(biopax = biopaxLevel3Example, pwid = pwid, splitComplexMolecules = FALSE, useIDasNodenames = TRUE, verbose = FALSE, withDisconnectedParts = FALSE)
pathwayAsGraph # should have 10 nodes, 11 edges
plotRegulatoryGraph(pathwayAsGraph)

rBiopaxParser documentation built on Oct. 31, 2019, 2:20 a.m.