Code covered by the BSD License  

Highlights from
Graph package

3.4

3.4 | 6 ratings Rate this file 58 Downloads (last 30 days) File Size: 36.91 KB File ID: #12648
image thumbnail

Graph package

by Kyaw Tun

 

16 Oct 2006 (Updated 06 Jun 2009)

Graph package for molecular biologist

| Watch this File

File Information
Description

In biology, graph formalism is prevalently used. This graph package is for you to analysis biomolecular interaction network with the comfort of MATLAB. The package includes algorithm like modularity, clustering coefficient, all-pair shortest path (amazingly fast, great if you have 64-bit) and so on. It also do plotting the graph with force directed layout. The graph can be generated from various input format as well as SBML , GML, DOT or SIF file.

The package is written as MATLAB object and furnish with rich tools for manipulating the graph object and export adjacency matrix for further analysis.

MATLAB release MATLAB 7 (R14)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (17)
24 Jun 2007 khalid roshdy roshdy

please i need to know how to iniliaze the graph and entering the adject matrices and use all the package, plesae give me some examples about this

06 Jul 2007 saad h

Hi,

I am interested to do some experiments using
your Graph package for molecular biologist.
I you appreciate some examples on how to uses it.
Regards,
saad

16 Jan 2008 Sonia Leach

I believe there might be several errors in the code for computing the clustering coefficient in clusteringcoeff.m

Currently lines of the code read:
        for k1 = 1:a
        for k2 = k1+1:a
            if adj(k1,k2) | adj(k2,k1)
                E = E + 1;
            end
        end
    end

But
 1. if the nested for loops are meant to cover all possible pairs, technically it should be 'for k1 = 1:(a-1)' though if the original matrix did not have self-loops, this will not affect the result. The check for non-self loops in 'neighbours' only removes the self-loop of the node, not self-loops among its neighbors so if the adjacency matrix has self-loops, this code would be incorrect - unless I am mistaken about the calculation of the clustering coefficient? Given that the calculation counts the 'denominator' as 'all possible pairs' (a(a-1)/2), this makes me think that the authors assume no self loops in the graph. In that case, the code is incorrect.
  3. a is meant to be the number of neighbors and k1, k2 to enumerate over the SET of neighbors, not be the IDENTITY of the neighbors so the line
    'if adj(k1,k2) | adj(k2,k1)'
should instead read
     if adj(neighbours(k1), neighbours(k2)) | adj(neighbours(k2), neighbours(k1))
to access the actual indices of the neighbors, not just the nodes 1:a....

I believe the correct version of this segment of code should be:
    for k1 = 1:(a-1)
        for k2 = k1+1:a
            if adj(neighbours(k1),neighbours(k2)) | adj(neighbours(k2),neighbours(k1))
                E = E + 1;
            end
        end
    end

14 Mar 2008 Jeff Kilpatrick

BFS and shortestPath don't seem to work either. The former doesn't handle self-loops (which is why I tried this over the Bioinformatics toolbox to begin with) and the latter makes use of a non-existent function.

21 Oct 2008 Igor Mishkovski

Hi,
I am interested in using the graph package for calculation of the modularity of a complex network. I work with adjacency matrix, but the input in modularity is in other format. So, can you tell me the input format of the network to calculate its modularity.
Thanks in advance,
Igor Mishkovski

22 Jan 2009 Kyaw

To calculate mocularity,

g = graph(adjacency_matrix)
m = modularity(g)

14 Aug 2009 naratip santitissadeekorn

Does these coded work for directed, weighted graph?

26 Aug 2009 mezxl

has anyone had success installing this toolbox with MATLAB v7.5 Release R2007b (on Win XP Pro)

I unzipped the files to the /toolbox/local/ folder and tried adding the new @graph folder to path-- however I get this message:

"Warning: Method directories not allowed in MATLAB path: ...."

Even when I cd into the folder, Matlab can't seem to find the .m files to run (I'm trying I gg = graph(10);)

Any pointers? Thanks.

 

31 Aug 2009 xiao meng

has anyone had success installing this toolbox with MATLAB v7.5 Release R2007b (on Win XP Pro)

I unzipped the files to the /toolbox/local/ folder and tried adding the new @graph folder to path-- however I get this message:

"Warning: Method directories not allowed in MATLAB path: ...."

Any pointers? Thanks.

29 Sep 2009 Sarah Ostadabbas

Hi,

I'm using your tool for plotting EEG channels in matlab. Now I want to change the node placement to arrange them in the proper position as appeared in EEG cab. Any suggestion?

Thanks.

16 Jun 2010 Tun

naratip!

Graph data structure is for directed, but most methods are for undirected graph.

Kyaw

13 Jul 2010 Grozavu

Hi,

  I'am using Matlab R2006a and I tried to use this package and I have the following error:
>> g = graph(10)
??? Attempt to reference field of non-structure array.

Error in ==> size at 14
        m = length(g.nodes);

Error in ==> graph at 370
    elseif (isnumeric(varargin{1}) || islogical(varargin{1})) && ...

Error in ==> graph at 366
                g = graph(adj);

Moreover, I need to transform a gml graph into an adgacency matrix.

Could you explain me how does it works? Thanks a lot.

03 Sep 2010 Shen Lin

Why it's aways 1 when I calculate the assortativity of a network? Did some try that before?

29 Dec 2010 Jose

How to install this package?

14 Feb 2011 Andrew Paulogiann  
08 Nov 2011 KONG

use matlab built-in JAVA???

23 Jan 2012 KONG

Excuse me.
Input:Adjacency matrix,how can I use the clustering algorithm to layout a graph,please?

Please login to add a comment or rating.
Updates
17 Oct 2006

Updated support for SIF file input and some bug fix.

18 Oct 2006

description, keywords update

19 Oct 2006

Spectral partitioning update

23 Oct 2006

spectral partitioning update

23 Oct 2006

Layout update.

27 Oct 2006

Update

06 Jun 2009

Add graph partitioning, some kernel methods and bug fix

Tag Activity for this File
Tag Applied By Date/Time
specialized Kyaw Tun 22 Oct 2008 08:43:55
plotting Kyaw Tun 22 Oct 2008 08:43:55
graph algorithm Kyaw Tun 22 Oct 2008 08:43:55
layout Kyaw Tun 22 Oct 2008 08:43:55
sbml Kyaw Tun 22 Oct 2008 08:43:55
modularity Kyaw Tun 22 Oct 2008 08:43:55
all pair shortest path Kyaw Tun 22 Oct 2008 08:43:55
weighted graph naratip santitissadeekorn 14 Aug 2009 00:04:58
does these codes work for the directed naratip santitissadeekorn 14 Aug 2009 00:04:58
plotting Yaquan Xu 06 Oct 2009 23:46:56
sbml Grozavu 15 Jul 2010 07:19:31
does these codes work for the directed Tomaso Aste 17 Mar 2011 05:46:07
all pair shortest path Samit Biswas 03 Sep 2011 23:27:58
graph algorithm Joanne 03 Feb 2012 09:34:42

Contact us at files@mathworks.com