R/netProcess.R
vertexDeleteReconnect.Rd
This function removes vertices given as vids
and connects their neighbours as
long as the shortest path beween the neighbours are below the reconnect.threshold
.
vertexDeleteReconnect(
graph,
vids,
reconnect.threshold = vcount(graph),
copy.attr = NULL
)
A reaction network.
Vertex ids to be removed.
If the shortest path between vertices is larger than this threshold, they are not reconnected.
A function, or a list of functions, combine edge attributes. Edge attributes of new edges (between reconnected neighbours) are obtained by combining original edges attributes along the shortest path between reconnected neighbors.
A modified graph.
Other Network processing methods:
expandComplexes()
,
makeMetaboliteNetwork()
,
makeReactionNetwork()
,
reindexNetwork()
,
rmSmallCompounds()
,
simplifyReactionNetwork()
## Remove all reaction vertices from a bipartite metabolic network
## keeping only metabolite vertices.
data(ex_sbml)
graph <- vertexDeleteReconnect(ex_sbml, vids=which(V(ex_sbml)$reactions))
#> 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...