Description Usage Arguments Value Author(s) Examples
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.
1 2 3 4 5 6 7 8 9 |
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 |
Returns the a graph object of the specified pathway. Edges with no direction are indicated by a 0 weight.
Nirupama Benis
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)
|
Loading required package: data.table
Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, sd, var, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, basename, cbind, colMeans, colSums, colnames,
dirname, do.call, duplicated, eval, evalq, get, grep, grepl,
intersect, is.unsorted, lapply, lengths, mapply, match, mget,
order, paste, pmax, pmax.int, pmin, pmin.int, rank, rbind,
rowMeans, rowSums, rownames, sapply, setdiff, sort, table, tapply,
union, unique, unsplit, which, which.max, which.min
Attaching package: 'graph'
The following object is masked from 'package:rBiopaxParser':
combineNodes
Warning messages:
1: In pathway2Graph(biopax = biopaxLevel3Example, pwid = pwid, splitComplexMolecules = FALSE, :
Problem while adding edge (weight = 1) to graph: Edge already exists between Complex4242 and PhysicalEntity567 (weight = (opposite direction)). Skipping this edge.
2: In .local(from, to, graph) : edges replaced: 'Complex4238|Complex4239'
3: In pathway2Graph(biopax = biopaxLevel3Example, pwid = pwid, splitComplexMolecules = FALSE, :
Problem while adding edge (weight = 1) to graph: Edge already exists between Complex4242 and PhysicalEntity567 (weight = (opposite direction)). Skipping this edge.
4: In .local(from, to, graph) : edges replaced: 'Complex4242|Complex4244'
A graphNEL graph with directed edges
Number of Nodes = 23
Number of Edges = 24
Loading required package: Rgraphviz
Loading required package: grid
Loading required package: igraph
Attaching package: 'igraph'
The following objects are masked from 'package:graph':
degree, edges, intersection, union
The following objects are masked from 'package:BiocGenerics':
normalize, path, union
The following objects are masked from 'package:stats':
decompose, spectrum
The following object is masked from 'package:base':
union
Warning messages:
1: In pathway2Graph(biopax = biopaxLevel3Example, pwid = pwid, splitComplexMolecules = FALSE, :
Problem while adding edge (weight = 1) to graph: Edge already exists between Complex4242 and PhysicalEntity567 (weight = (opposite direction)). Skipping this edge.
2: In .local(from, to, graph) : edges replaced: 'Complex4238|Complex4239'
3: In pathway2Graph(biopax = biopaxLevel3Example, pwid = pwid, splitComplexMolecules = FALSE, :
Problem while adding edge (weight = 1) to graph: Edge already exists between Complex4242 and PhysicalEntity567 (weight = (opposite direction)). Skipping this edge.
4: In .local(from, to, graph) : edges replaced: 'Complex4242|Complex4244'
A graphNEL graph with directed edges
Number of Nodes = 10
Number of Edges = 11
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.