pathway2Graph {rBiopaxParser} | R Documentation |
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.
pathway2Graph(biopax, pwid, expandSubpathways = TRUE, splitComplexMolecules = FALSE, useIDasNodenames = TRUE, verbose = FALSE, withDisconnectedParts = TRUE)
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
# 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)