Skip to content

BiGG models can raise invalid decimal literal errors #30

Description

@Kivean

BiGG naming conventions allow metabolite names to start with a number, which apparently causes issues when parsing the SBML file. Running DNNGIOR on this model. Also running it with the Phylum_Proteobacteria NN.

Here's the error DNNGIOR is throwing:

Traceback (most recent call last):

  File ~/miniforge3/envs/dnngior/lib/python3.11/site-packages/IPython/core/interactiveshell.py:3748 in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)

  Cell In[17], line 2
    gapfilled_model_complete = dnngior.Gapfill(draftModel = path_to_model, trainedNNPath=path_to_NN, dbType='BiGG',

  File ~/miniforge3/envs/dnngior/lib/python3.11/site-packages/dnngior/gapfill_class.py:70 in __init__
    self.db_reactions   =   Reaction(biochem_input = self.path_to_biochem, dbType=self.dbType)

  File ~/miniforge3/envs/dnngior/lib/python3.11/site-packages/dnngior/reaction_class.py:63 in __init__
    self.biochem_input = self.__get_reactions_from_biochem_input(biochem_input)

  File ~/miniforge3/envs/dnngior/lib/python3.11/site-packages/dnngior/reaction_class.py:163 in __get_reactions_from_biochem_input
    reactions[reaction]['metabolites'] = eval(react_d[reaction][0]) #Evaluate the string as a dictionary.

  File <string>:1
    4crsol_c <->
    ^
SyntaxError: invalid decimal literal

If I'm reading get_reactions_from_biochem_input correctly, its reading reaction titles. The model itself includes 4crsol in only one reaction title, "R_sink_4crsol_c". There are other compounds (and therefore reaction titles) which start with numbers, I don't know why its throwing the error with this one in particular.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions