Skip to content

Commit ed8e764

Browse files
committed
Fixed a bug that caused wrong reaction reversibility assignments after gene and reaction removal.
1 parent 48e661f commit ed8e764

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Toolbox/Core.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1306,7 +1306,7 @@
13061306

13071307
Unprotect[deleteIndicesKeepConsistent];
13081308
deleteIndicesKeepConsistent::usage="Remove indices from a list of indices and change the resulting list of indices appropriately."
1309-
deleteIndicesKeepConsistent[indices_List,indices2delete_List]:=Fold[DeleteCases[#1,#2]/.i_Integer/;i>#2:>i-1&,Union@Sort[indices],Union@Sort[indices2delete]]
1309+
deleteIndicesKeepConsistent[indices_List,indices2delete_List]:=Fold[DeleteCases[#1,#2]/.i_Integer/;i>#2:>i-1&,Sort@Union[indices],MapIndexed[#-(First@#2-1)&,Sort@Union@indices2delete]];
13101310
def:deleteIndicesKeepConsistent[___]:=(Message[Toolbox::badargs,deleteIndicesKeepConsistent,Defer@def];Abort[])
13111311
Protect[deleteIndicesKeepConsistent];
13121312

0 commit comments

Comments
 (0)