Skip to content

Commit

Permalink
Merge pull request #120 from SysBioChalmers/fix/rxnConfidenceScores
Browse files Browse the repository at this point in the history
fix/rxnConfidenceScores
  • Loading branch information
BenjaSanchez authored Jun 7, 2018
2 parents 5988973 + 77eeab4 commit 831d245
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 120 deletions.
45 changes: 45 additions & 0 deletions ComplementaryScripts/missingFields/addConfidenceScores.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% model = addConfidenceScores(model)
% Rough confidence scores for reaction
% Reactions with pubmedID and with gene information: 3
% Reactions with gene but without pubmedID: 2
% Reactions without gene but need for modelling: 1
% Reactions without gene: 0
% Exchange reactions: NaN
%
% Hongzhong Lu & Benjamín J. Sánchez
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function model = addConfidenceScores(model)

rxnConfidenceScores = zeros(size(model.rxns));

for i = 1:length(model.rxns)
if ~isempty(model.rules{i})
if ~isempty(model.rxnReferences{i})
rxnConfidenceScores(i) = 3;
else
rxnConfidenceScores(i) = 2;
end
else
rxnName = model.rxnNames{i};
if contains(rxnName,'exchange')
rxnConfidenceScores(i) = NaN;
elseif contains(rxnName,'SLIME rxn') || contains(rxnName,'pseudoreaction')
rxnConfidenceScores(i) = 1;
else
metNames = model.metNames(model.S(:,i) ~= 0);
for j = 1:length(metNames)
if contains(metNames{j},'backbone [') || contains(metNames{j},'chain [')
rxnConfidenceScores(i) = 1;
end
end
end
end
end

model.rxnConfidenceScores = rxnConfidenceScores;

end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
42 changes: 0 additions & 42 deletions ComplementaryScripts/missingFields/getConfidenceScores.m

This file was deleted.

2 changes: 1 addition & 1 deletion ModelFiles/dependencies.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MATLAB 9.4.0.813654 (R2018a)
libSBML 5.17.0
RAVEN_toolbox 2.0.0
COBRA_toolbox commit 08d1e02
COBRA_toolbox commit 7f88d93
SBML_level 3
SBML_version 1
fbc_version 2
Loading

0 comments on commit 831d245

Please sign in to comment.