Home > core > getMetsInComp.m

getMetsInComp

PURPOSE ^

getMetsInComp

SYNOPSIS ^

function [I, metNames]=getMetsInComp(model,comp)

DESCRIPTION ^

 getMetsInComp
   Gets the metabolites in a specified compartment

   model       a model structure
   comp        string with the compartment id

   I           boolean vector of the metabolites
   metNames    the names of the metabolites

   Usage: [I, metNames]=getMetsInComp(model,comp)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [I, metNames]=getMetsInComp(model,comp)
0002 % getMetsInComp
0003 %   Gets the metabolites in a specified compartment
0004 %
0005 %   model       a model structure
0006 %   comp        string with the compartment id
0007 %
0008 %   I           boolean vector of the metabolites
0009 %   metNames    the names of the metabolites
0010 %
0011 %   Usage: [I, metNames]=getMetsInComp(model,comp)
0012 
0013 comp=char(comp);
0014 
0015 J=find(ismember(upper(model.comps),upper(comp)));
0016 
0017 if numel(J)~=1
0018     EM=['No unique match to compartment "' comp{1} '"'];
0019     dispEM(EM);
0020 end
0021 
0022 I=model.metComps==J;
0023 metNames=model.metNames(I);
0024 end

Generated by m2html © 2005