opencobra / cobratoolbox

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

issue with metsCharges in xls2model #92

Closed robertoorellanar closed 7 years ago

robertoorellanar commented 8 years ago

Hello, I worked for many month in a model with an earlier version of cobra and saved all the results on excel spreadsheets, and it never had any issue. However, I changed my laptop and after installing the new Cobra version, the function to open excel file has the following error:

model = xls2model('model1.xlsx') ??? Reference to non-existent field 'metCharges'.

Error in ==> xls2model at 281 model.metCharges = columnVector(model.metCharges); % all others have plural for vector

I have already fixed a couple of duplications in the metabolite names and Ids, but the issue remains the same. Do you guys have any idea of what is a good solution for this??? Thanks a lot!

rmtfleming commented 8 years ago

Hi Roberto, it is not safe to model a metabolic network without knowing the charges of the metabolites in it because imbalanced charge (or imbalanced protons) can cycle around a model and generate ATP from nothing, leading to incorrect predictions. What are the charges of your metabolites? Regards, Ronan

On 10 December 2015 at 07:50, robertoorellanar notifications@github.com wrote:

Hello, I worked for many month in a model with an earlier version of cobra and saved all the results on excel spreadsheets, and it never had any issue. However, I changed my laptop and after installing the new Cobra version, the function to open excel file has the following error:

model = xls2model('model1.xlsx') ??? Reference to non-existent field 'metCharges'.

Error in ==> xls2model at 281 model.metCharges = columnVector(model.metCharges); % all others have plural for vector

I have already fixed a couple of duplications in the metabolite names and Ids, but the issue remains the same. Do you guys have any idea of what is a good solution for this??? Thanks a lot!

— Reply to this email directly or view it on GitHub https://github.com/opencobra/cobratoolbox/issues/92.

Mr. Ronan MT Fleming B.V.M.S. Dip. Math. Ph.D.

Senior research associate (EN) == Chercheur (FR), Principal investigator, Systems Biochemistry Group, wwwen.uni.lu/lcsb/research/systems_biochemistry Luxembourg Centre for Systems Biomedicine, University of Luxembourg, Campus Belval, 7, avenue des Hauts-Fourneaux Esch-sur-Alzette, Luxembourg, L-4362. & National Centre of Excellence in Research on Parkinson’s disease www.parkinson.lu & Adjunct Assistant Professor, Division of Analytical Biosciences, Leiden Academic Centre for Drug Research, Faculty of Science, University of Leiden.

http://analyticalbiosciences.leidenuniv.nl

Mobile: +352 621 175 112 Office: +352 466 644 5528

Skype: ronan.fleming

(This message is confidential and may contain privileged information. It is intended for the named recipient only. If you receive it in error please notify me and permanently delete the original message and any copies.)

robertoorellanar commented 8 years ago

Hi Ronan, I have metabolites charges, however it seems the function
model.metCharges = columnVector(model.metCharges) from xls2model.m is not capable to recognize it. Do you know any hint to try to deal with this?

rmtfleming commented 8 years ago

Hi Roberto, the error is happening before: ?? Reference to non-existent field 'metCharges'. Put in a breakpoint at : model.metCharges = columnVector(model.metCharges) Check what fields the model structure has. Regards, Ronan

On 10 December 2015 at 15:47, robertoorellanar notifications@github.com wrote:

Hi Ronan, I have metabolites charges, however it seems the function

model.metCharges = columnVector(model.metCharges) from xls2model.m is not capable to recognize it. Do you know any hint to try to deal with this?

— Reply to this email directly or view it on GitHub https://github.com/opencobra/cobratoolbox/issues/92#issuecomment-163645760 .

Mr. Ronan MT Fleming B.V.M.S. Dip. Math. Ph.D.

Senior research associate (EN) == Chercheur (FR), Principal investigator, Systems Biochemistry Group, wwwen.uni.lu/lcsb/research/systems_biochemistry Luxembourg Centre for Systems Biomedicine, University of Luxembourg, Campus Belval, 6, avenue du Swing, L-4367 Belvaux. & National Centre of Excellence in Research on Parkinson’s disease www.parkinson.lu & Adjunct Assistant Professor, Division of Analytical Biosciences, Leiden Academic Centre for Drug Research, Faculty of Science, University of Leiden.

http://analyticalbiosciences.leidenuniv.nl

Mobile: +352 621 175 112 Office: +352 466 644 5528

Skype: ronan.fleming

(This message is confidential and may contain privileged information. It is intended for the named recipient only. If you receive it in error please notify me and permanently delete the original message and any copies.)

robertoorellanar commented 8 years ago

Hi Ronan, I checked the structure and detected that some of the headers were different of what xls2model was expecting. Now this works beautifully again. Thanks so much!

ThierryMondeel commented 8 years ago

Hi guys,

I think I attempted to fix a similar issue in: https://github.com/opencobra/cobratoolbox/pull/71.

Might help.

Best, Thierry

laurentheirendt commented 7 years ago

@robertoorellanar , may you confirm that this problem is solved?

laurentheirendt commented 7 years ago

@tpfau , may you confirm that this is solved?

tpfau commented 7 years ago

@laurentheirendt, since the original author confirmed this to be solved above

Now this works beautifully again.

I assume it is, but without having the input files that were used I can't guarantee it. However i did recently import models using xls files without issues.

laurentheirendt commented 7 years ago

Thanks @tpfau. Closing now as xls2model has already a high coverage.