View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

Be the first to rate this file! 9 Downloads (last 30 days) File Size: 984 KB File ID: #42684 Version: 1.4
image thumbnail




18 Jul 2013 (Updated )

A toolbox to interactively create, customize and explore multi-systemic metabolic reaction networks

| Watch this File

File Information

A Matlab-based tool to create custom sub-networks using main substrate-product pairs as defined by the Kyoto Encyclopaedia of Genes and Genomes (KEGG). It can be used to explore transgenomic interactions, for example mammalian and bacterial associations. It calculates the shortest path between a set of metabolites (e.g. biomarkers from a metabonomic study) and plots the connectivity between metabolites as links in a network graph. The resulting graph can be changed and explored interactively. Furthermore, nodes in the graph are linked to the KEGG compound webpage.
A multi-systemic example data set is provided of a supra-organism, this includes reactions that can occur in compartments of homo sapiens, firmicutes and/or bacretoidetes species. The MetaboGetworks function can be used to generate custom multi-organism databases to use in the MetaboNetworks function. (See the READ ME file)


Matlab Bgl inspired this file.

Required Products MATLAB
MATLAB release MATLAB 7.14 (R2012a)
MATLAB Search Path
/Example data
Other requirements Platform dependence: none found (tested on Windows 7, Mac OSX 7.14 (Snow Leopard)) Software dependence: none found (tested on Matlab versions 2010b, 2012a, 2012b, 2013a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (11)
02 May 2016 Ricky80

Hi!Is there a way to add a organism non included in the actual list?

Comment only
31 Mar 2016 Dominik

Hi, this is a helpful tool, but the KEGG reactions are typically directed. The adjacency matrix your tool creates is symmetric. is there a way to get directed edges?

Comment only
21 Mar 2016 Joram Posma

Hi Arman,

K is a list of KEGG IDs corresponding to each row/column in A.
You can find the names (there can be multiple per KEGG ID) by looking into N, C and I.

Hope this helps.

Comment only
21 Mar 2016 Arman MK

Thanks a lot for your help. For E.Coli I found a large matrix of approximately 18000 by 18000. How the rows and columns are labeled by metabolites?

Thanks again

Comment only
18 Mar 2016 Joram Posma

Hi Arman,

Use MetaboGetworks to get the database for the organism you are interested in, then look in the saved database file for the variable 'A' to get the metabolite-metabolite adjacency matrix.

If you are specifically looking for 'static pathways' that are connected to other 'static pathways' (e.g. glycolysis/glucogenesis and sucrose/starch) MetaboNetworks/MetaboGetworks will not give you that as it does not use 'pathways' but looks at the whole metabolic network. If this IS what you want to do, I recommend you to look at the KEGG REST-API help pages, it will show you how to get entries for a pathway, in this you will also find the 'pathways' that are linked to it. Good luck!

Comment only
17 Mar 2016 Arman MK

Thanks a lot for this great toolbox.
I have a question. I need to access the adjacency matrix for all the KEGG pathways for an organism. I need the matrix itself, so I can perform some other functions on it. How can I extract the adjacency matrix from your code.

Thank You,

Comment only
13 May 2015 Joram Posma

Hi Xiaoqiang,

I believe we have solved your problem via email exchange. So this is for any other people encountering the same problem:

This issue has to do with the number of metabolites in KEGG, this is different in the example data (generated in Feb 2014) compared to data now. All metabolites are always included in the database/adjacency matrix (currently >17000 total). Thus creating a distance matrix results in a matrix the same size as the adjacency matrix (with a lot of metabolites at infinite distance to each other as they are unconnected). One solution is to remove all metabolites that are unconnected, e.g. using:

>> ii=full(sum(A)==0);
>> jj=ismember(C,K(ii));
>> A(ii,:)=[];
>> A(:,ii)=[];
>> K(ii)=[];
>> C(jj)=[];
>> I(jj)=[];
>> N(jj)=[];
>> [~,~,I]=unique(I);
>> save('database_new.mat','A','K','C','E','I','N');

Comment only
11 May 2015 xu xiaoqiang

it's a great work about the MetaboNetworks; but I have problems with MetaboNetworks function in matlab2014a;after I creat an database using MetaboGetworks(so far is good),I always have the same problem using the MetaboNetworks: out of memorry(I just use the human species database(616KB) and run in 4G memorry PC with 2 metabolite);however when I use example database(14505KB),it's ok!; Is any bugs in creating database using MetaboGetworks(I follow the guide line step by step)?

Comment only
17 Mar 2015 Joram Posma

Hi Marco,

I have updated the code that should resolve the error you got. It is caused by a naming ambiguity in KEGG of a newly added species.

I ran some checks and it works here in 2014a, hope it does for you as well.

Comment only
16 Mar 2015 Marco

Marco (view profile)

It's a very good tool, but I have some problems with the MetaboGetworks function.I get an error message when I run MetaboGetworks. I would be very thankful if you could consider my problem.
The rest of tool run good. I'm using the Matlab version 2014a.
Below the error message:

EDU>> MetaboGetworks

Index exceeds matrix dimensions.

Error in OrganismFindGUI>OrganismFindGUI_OpeningFcn (line 48)

Error in gui_mainfcn (line 220)
feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:});

Error in OrganismFindGUI (line 15)
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});

Error in MetaboGetworks (line 9)

Comment only
22 Apr 2014 yysuccess


Comment only
22 Jul 2013 1.1

Removal of a parfor in the TextMatch code.

03 Sep 2013 1.2

Fixed 2 errors in subfunctions of MetaboGetworks, added function descriptions of input and output variables.

16 Sep 2013 1.3

2 new functionalities: edges linked to corresponding KEGG reaction pair web page, text edit option to change a specific string (e.g. 'hydroxy' to 'OH') for all nodes simultaneously. Search functions for selecting organisms/metabolites were updated.

17 Mar 2015 1.4

Fixed the error in OrganismFindGUI caused by a naming ambiguity in KEGG.
Added updated code for faster database generation and network layouts.

Contact us