vertexDeleteReconnect: Network editing: removing vertices and connecting their...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/netProcess.R

Description

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.

Usage

1
2
vertexDeleteReconnect(graph, vids, reconnect.threshold = vcount(graph),
  copy.attr = NULL)

Arguments

graph

A reaction network.

vids

Vertex ids to be removed.

reconnect.threshold

If the shortest path between vertices is larger than this threshold, they are not reconnected.

copy.attr

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.

Value

A modified graph.

Author(s)

Ahmed Mohamed

See Also

Other Network processing methods: expandComplexes, makeReactionNetwork, rmSmallCompounds, simplifyReactionNetwork

Examples

1
2
3
4
 ## 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))

NetPathMiner documentation built on May 31, 2017, 1:28 p.m.

Search within the NetPathMiner package
Search all R packages, documentation and source code