cdanielmachado / carveme

CarveMe: genome-scale metabolic model reconstruction
Other
145 stars 49 forks source link

Gapfilling error: 'NoneType' object has no attribute 'isSetChemicalFormula' #117

Closed rodsanpas closed 3 years ago

rodsanpas commented 3 years ago

Thank you very much for all the hard work, required to keep this software up and running and your continuous help. After generating a model, when I use the gapfill command on the model with a newly defined media I get ttwo different errors depending on the output version I chose when creating it: When I generated the model with --fbc2 I get: "None of [Index(['medium', 'compound'], dtype='object')] are in the [columns]" When I generated the model with --cobra I get 'NoneType' object has no attribute 'isSetChemicalFormula'

As I thought the mistake could be due to medium composition and BIGG compound availability, in my media I only included compounds that were also reflected in the library of media compositions. And the gapfill command I used was the following: gapfill Ophiostoma_primer_fbc2.xml -m GPP --mediadb GPP.tsv

Thank you once again for your help

cdanielmachado commented 3 years ago

Can you share the GPP.tsv file here?

rodsanpas commented 3 years ago

There it is, I gziped it so I could upload it here GPP.tsv.gz

cdanielmachado commented 3 years ago

That's what I thought... it's missing the header with the column names... :)

rodsanpas commented 3 years ago

Thank you very much, there was indeed an error because of the missing headers. However, after adding them, I keep getting the error: 'NoneType' object has no attribute 'isSetChemicalFormula' when I use the cobra format and when I use fbc2 format now it raises a new error, which makes me think it is reading the medium file properly, but it encounters some trouble later on in the process: _Traceback (most recent call last): File "/home/manolo/anaconda3/envs/env3.6/bin/gapfill", line 8, in sys.exit(main()) File "/home/manolo/anaconda3/envs/env3.6/lib/python3.6/site-packages/carveme/cli/gapfill.py", line 126, in main verbose=args.verbose) File "/home/manolo/anaconda3/envs/env3.6/lib/python3.6/site-packages/carveme/cli/gapfill.py", line 65, in maincall spent_model=spent_model) File "/home/manolo/anaconda3/envs/env3.6/lib/python3.6/site-packages/carveme/reconstruction/gapfilling.py", line 140, in multiGapFill scores=scores, inplace=True, bigM=bigM, solver=solver, tag=mediumname) File "/home/manolo/anaconda3/envs/env3.6/lib/python3.6/site-packages/carveme/reconstruction/gapfilling.py", line 74, in gapFill raise RuntimeError('Failed to gapfill model for medium {}'.format(tag)) RuntimeError: Failed to gapfill model for medium GPP

Once again, thank you very much

cdanielmachado commented 3 years ago

This means that the organism cannot grow on that medium, no matter how many gap-filling reactions it tries to add. Maybe some essential nutrient is missing.

cdanielmachado commented 3 years ago

I can see you are missing these 3 nutrients:

cobalt2 Co2+
fe3 Fe3+
k   K+