Code covered by the BSD License  

Highlights from
Graph manipulation

5.0 | 1 rating Rate this file 13 Downloads (last 30 days) File Size: 2.89 KB File ID: #37475 Version: 1.0

Graph manipulation



These four files are intended for adding/deleting nodes and edges in biograph object

| Watch this File

File Information

Biograph class does not allow adding of deleting nodes or edges.
Here is the way how to overcome this. contains four M-files:

node_add.m - add node to existing graph
node_del.m - delete node from existing graph
edge_add.m - add edge to existing graph
edge_del.m - delete edge from existing graph

Required Products Bioinformatics Toolbox
MATLAB release MATLAB 7.10 (R2010a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
08 Nov 2013 Sven

Sven (view profile)

Excellent submission. I was surprised that there's nothing already in biograph to manipulate an already-computed graph. I'm making a few small additions such as the ability to remove a set of nodes by sticking this loop at the top of node_del()

if isnumeric(NodeID) && numel(NodeID)>1
for i = 1:length(NodeID)
thisNID = NodeID(i);
bg = node_del(bg,thisNID);
NodeID(NodeID>thisNID) = NodeID(NodeID>thisNID)-1;

Contact us