0001 function pathway=markPathwayWithExpression(pathway,model,experiment,experimentOrder)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 if numel(experimentOrder)~=2
0019 dispEM('This can only be done for two cases at the moment (experimentOrder must be two elements)');
0020 end
0021
0022
0023 [present expIds]=ismember(experimentOrder,experiment.experiments);
0024
0025 if ~all(present)
0026 dispEM('Not all experiments could be found in the experiment structure');
0027 end
0028
0029 experiment.data=experiment.data(:,expIds);
0030 experiment.experiments=experiment.experiments(:,expIds);
0031
0032
0033
0034 for i=1:numel(pathway.listOfSpecies)
0035 if strcmp('PROTEIN', pathway.listOfSpecies(i).type)
0036 if isfield(pathway.listOfSpecies(i),'note')
0037 if ~isempty(pathway.listOfSpecies(i).note)
0038
0039 [present index]=ismember(pathway.listOfSpecies(i).note,model.rxns);
0040
0041
0042 if any(present)
0043 [crap genes]=find(model.rxnGeneMat(index,:));
0044
0045
0046 if any(genes)
0047 [present experimentIndexes]=ismember(model.genes(genes),experiment.orfs);
0048
0049
0050 if any(present)
0051 pathway.listOfSpecies(i).orfs=experiment.orfs(experimentIndexes(present));
0052 pathway.listOfSpecies(i).expA=experiment.data(experimentIndexes(present),1);
0053 pathway.listOfSpecies(i).expB=experiment.data(experimentIndexes(present),2);
0054 end
0055 end
0056 end
0057 end
0058 end
0059 end
0060 end