Skip to content

Commit

Permalink
Merge pull request #363 from SysBioChalmers/devel
Browse files Browse the repository at this point in the history
RAVEN 2.5.3
  • Loading branch information
edkerk authored Aug 26, 2021
2 parents 4072bea + 057b016 commit 05fb733
Show file tree
Hide file tree
Showing 2 changed files with 161 additions and 159 deletions.
9 changes: 5 additions & 4 deletions core/getModelFromHomology.m
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,11 @@
%Remove reactions that are not associated to any of the genes in
%allGenes, thereby also keeping complexes where only for one of the
%genes was matched
b = models{useOrderIndexes(i)}.rxnGeneMat(:,~a);
[b,~] = unique(b); % Reactions to remove

models{useOrderIndexes(i)}=removeReactions(models{useOrderIndexes(i)},b,true,true,true);
[rxnsToKeep,~] = find(models{useOrderIndexes(i)}.rxnGeneMat(:,a));
rxnsToRemove = repmat(1,numel(models{useOrderIndexes(i)}.rxns),1);
rxnsToRemove(rxnsToKeep) = 0;
rxnsToRemove = find(rxnsToRemove);
models{useOrderIndexes(i)}=removeReactions(models{useOrderIndexes(i)},rxnsToRemove,true,true,true);
end

%Since mergeModels function will be used in the end, the models are
Expand Down
Loading

0 comments on commit 05fb733

Please sign in to comment.