cdanielmachado / carveme

CarveMe: genome-scale metabolic model reconstruction

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gapfill universe flavor

JosuaCarl opened this issue · comments

When passing gapfill -m SNM3 --mediadb "SNM3.tsv" -o "...l" --universe-file "/.../universe_grampos.xml.gz" --fbc ..
or gapfill -m SNM3 --mediadb "SNM3.tsv" -o "...l" --universe-file "/.../universe_grampos.xml.gz" --cobra ... to carveme, the error

Traceback (most recent call last):
  File "/home/salatan/anaconda3/bin/gapfill", line 8, in <module>
    sys.exit(main())
  File "/home/salatan/anaconda3/lib/python3.8/site-packages/carveme/cli/gapfill.py", line 118, in main
    maincall(inputfile=args.input,
  File "/home/salatan/anaconda3/lib/python3.8/site-packages/carveme/cli/gapfill.py", line 41, in maincall
    universe_model = load_cbmodel(universe_file)
  File "/home/salatan/anaconda3/lib/python3.8/site-packages/reframed/io/sbml.py", line 148, in load_cbmodel
    load_metabolites(sbml_model, model, flavor, load_metadata)
  File "/home/salatan/anaconda3/lib/python3.8/site-packages/reframed/io/sbml.py", line 220, in load_metabolites
    model.add_metabolite(load_metabolite(species, flavor, load_metadata=load_metadata))
  File "/home/salatan/anaconda3/lib/python3.8/site-packages/reframed/io/sbml.py", line 228, in load_metabolite
    if fbc_species.isSetChemicalFormula():
AttributeError: 'NoneType' object has no attribute 'isSetChemicalFormula'

comes up.

After some error searching, I found, that gapfill.py does only pass the flavor on for your model. Because the standard grampos universe does not use the fbc plugin, ReFramed returns an error when reading in the universe file.

The universe could be read in, when changing load_cbmodel(universe_file) to load_cbmodel(universe_file, flavor="cobra") in gapfill.py.

Yes you are right, I was using version 1.4.0. Thank you again for your reply, I'm gonna close this now.