Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem running the code. #5

Open
danieltba opened this issue Jan 19, 2017 · 7 comments
Open

Problem running the code. #5

danieltba opened this issue Jan 19, 2017 · 7 comments

Comments

@danieltba
Copy link

Hi, I have problems executing the code, my setup is

MAC OSX
opencobra 7e6385f
Gurobi7
Matlab R2012a

I get the following error output when I run main.m:

MException

Properties:
identifier: ''
message: [1x54 char]
cause: {0x1 cell}
stack: [6x1 struct]

Methods

MException

Properties:
identifier: ''
message: [1x54 char]
cause: {0x1 cell}
stack: [6x1 struct]

Methods

86 exchange_rates = fluxes_exp(exchange_idxs_data);
K>> fluxes_exp(exchange_idxs_data)
Index exceeds matrix dimensions.

Index exceeds matrix dimensions.

Error in evaluate_method (line 86)
exchange_rates = fluxes_exp(exchange_idxs_data);

Error in benchmark_method (line 31)
result = evaluate_method(model, dataset, method, condition,
ref_condition, options);

Error in main (line 49)
benchmark_method(methods{i}, model, dataset, options);

Wonder if you could help me find the error, from what I see the error comes from the function

fluxes_exp = fit_fluxes_to_model(model, dataset.reactions, fluxes_exp_old);

which returns an empty object instead of the fitted fluxes(as required I presume),

Thank you and best regards.

@cdanielmachado
Copy link
Owner

From that description is hard to tell what could be going wrong.

One possibility is to try to setup an environment more similar to the one used in the paper, i.e., using Gurobi 5 and a snapshot of the cobra toolbox from early 2014.

@prakruthiburra
Copy link

I am running into this error with the function fit_fluxes_to_model where two of the entries for j which is idxs() are 0.
Is there some workaround for this?

Subscript indices must either be real positive integers or logicals.
Error in fit_fluxes_to_model (line 13)
QPproblem.F(j,j) = 1;
Error in evaluate_method (line 75)
fluxes_exp = fit_fluxes_to_model(model, dataset.reactions,
fluxes_exp_old);
Error in benchmark_method (line 31)
result = evaluate_method(model, dataset, method, condition, ref_condition,
options);
Error in main (line 53)
benchmark_method(methods{i}, model, dataset, options);

@cdanielmachado
Copy link
Owner

Are you using the datasets provided in the paper without modification?

It seems to me the problem is that the indexes are zero because some reactions are not in the model.

@prakruthiburra
Copy link

The datasets in the paper are being used without any modification. I'm however using the latest CobraToolbox. I see that there's a problem in even adding some exchange reactions because of the subscript indices.
I'll try using an older version of the toolbox and see if that helps.
What would you recommend?

Thanks for the help!

@cdanielmachado
Copy link
Owner

Other users of this code also had problems with cobra toolbox. In order to replicate the results of the paper you will need to use a version of cobra with a release date previous to the publication of the paper. You can go to their github repository and pull something from early 2014. That should work.

@falalou
Copy link

falalou commented Dec 10, 2018

I am running into this error with the function fit_fluxes_to_model where two of the entries for j which is idxs() are 0.
Is there some workaround for this?

Subscript indices must either be real positive integers or logicals.
Error in fit_fluxes_to_model (line 13)
QPproblem.F(j,j) = 1;
Error in evaluate_method (line 75)
fluxes_exp = fit_fluxes_to_model(model, dataset.reactions,
fluxes_exp_old);
Error in benchmark_method (line 31)
result = evaluate_method(model, dataset, method, condition, ref_condition,
options);
Error in main (line 53)
benchmark_method(methods{i}, model, dataset, options);

Hello.

I am running into the same problems. I ve tried unsuccessfully deal with the indexing.
Did you manage to run it successfully with cobraToolbox (new or old version)?

Thanks

@BarryXx
Copy link

BarryXx commented Aug 18, 2022

I am running into this error with the function fit_fluxes_to_model where two of the entries for j which is idxs() are 0. Is there some workaround for this?

Subscript indices must either be real positive integers or logicals. Error in fit_fluxes_to_model (line 13) QPproblem.F(j,j) = 1; Error in evaluate_method (line 75) fluxes_exp = fit_fluxes_to_model(model, dataset.reactions, fluxes_exp_old); Error in benchmark_method (line 31) result = evaluate_method(model, dataset, method, condition, ref_condition, options); Error in main (line 53) benchmark_method(methods{i}, model, dataset, options);

EXCUSE me are you solve this problem? could you please send me the link for the old version cobratoolbox I did not find it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants