This function removes reaction vertices with no gene annotations as indicated by the parameter
gene.attr, and connect their neighbour vertices to preserve graph connectivity. This is
particularly meaningful when reactions are translocation or spontaneous reactions,
which are not catalysed by genes.
simplifyReactionNetwork(
reaction.graph,
gene.attr = "genes",
remove.missing.genes = TRUE,
reconnect.threshold = vcount(reaction.graph)
)A reaction network.
The attribute to be considered as "genes". Reactions missing this annotation, will be removed.
If FALSE, only tranlocation and spontaneous reactions are removed, otherwise
all rections with no gene annotations are removed.
An argument passed to vertexDeleteReconnect
A simplified reaction network.
Other Network processing methods:
expandComplexes(),
makeMetaboliteNetwork(),
makeReactionNetwork(),
reindexNetwork(),
rmSmallCompounds(),
vertexDeleteReconnect()
data(ex_sbml)
rgraph <- makeReactionNetwork(ex_sbml, simplify=FALSE)
#> This graph was created by an old(er) igraph version.
#> ℹ Call `igraph::upgrade_graph()` on it to use with the current igraph version.
#> For now we convert it on the fly...
## Removes all reaction nodes with no annotated genes.
rgraph <- simplifyReactionNetwork(rgraph, remove.missing.genes=TRUE)