opencobra / cobratoolbox

The COnstraint-Based Reconstruction and Analysis Toolbox. Documentation:
https://opencobra.github.io/cobratoolbox
Other
253 stars 318 forks source link

checkDuplicate in addReaction seems to be set to 1 #795

Closed akaviaLab closed 7 years ago

akaviaLab commented 7 years ago

Please include a short description of problem here The documentation for addReaction says that checkDuplicate default is set to false. However, line 164 parser.addParameter('checkDuplicate',1, @(x) isnumeric(x) || islogical(x)); sets checkDuplicate as 1. This is problematic when adding lots of reactions, since lines 307-308 check for duplicates and take most of the running time of the function.

I'm not submitting a pull request, since my git tree is messed up right now, and I'm trying to solve it.

I hereby confirm that I have:

(Note: You may replace [] with [X] to check the box)

laurentheirendt commented 7 years ago

@akaviaLab, thanks for reporting this. It would be great if you could submit a PR for this 🎉

laurentheirendt commented 7 years ago

Closing as fixed by PR #835. Thanks @akaviaLab 👍