AuReMe / metage2metabo

From annotated genomes to metabolic screening in large scale microbiotas
https://metage2metabo.readthedocs.io
GNU Lesser General Public License v3.0
53 stars 7 forks source link

IScope Issue #65

Open ggmirandac opened 1 week ago

ggmirandac commented 1 week ago

Hi,

I am having huge issues while running the iscope. I have a set of models created with m2m recon and then the pgdb files were compiled into a sbml with the function metage2metabo.sbml_management.pgdb_to_sbml.

When I read the sbml with CobraPy everything seems right. But when I try to use the iscope function, the output is none. This is weird because even though the models have no flux values, because that they are ecological sample. And typically broad seed like 'BIOTIN_c' the final iscope of all species is {}.

Do you know what might have gone wrong?

Bests,

Gabriel

ArnaudBelcour commented 1 week ago

Hi @ggmirandac,

As iscope is not returning any results, a possible issue could be in the seeds file. The metabolite IDs in the seeds file could not be present in the metabolic networks. A tricky part of metage2metabo is that, compared to CobraPy, it does not perform the encapsulation of the ID (by this I mean converting BIOTIN_c into M_BIOTIN_c).

Can you look at your seed SBML file and see how the metabolite IDs are encoded and check that they are written in the same way as in the metabolic networks?

Because if the seeds file looks like this (metabolite names are just for example and not corresponding to metabolite IDs):

<sbml xmlns="http://www.sbml.org/sbml/level2" level="2" version="1">
    <model id="metabolites">
        <listOfSpecies>
        <species id="BIOTIN_c" name="BIOTIN" compartment="c"/>
        </listOfSpecies>
</model>
</sbml>

And the metabolic network looks like this:

<sbml xmlns="http://www.sbml.org/sbml/level2" level="2" version="1">
    <model id="metabolites">
       <listOfReactions>
          <reaction metaid="R_reaction_01" id="R_reaction_01">
            <listOfReactants>
              <speciesReference species="M_BIOTIN_c" stoichiometry="1" constant="true"/>
              <speciesReference species="M_ATP_c" stoichiometry="1" constant="true"/>
              <speciesReference species="M_CoA_c" stoichiometry="1" constant="true"/>
            </listOfReactants>
            <listOfProducts>
              <speciesReference species="M_ATP_c" stoichiometry="1" constant="true"/>
              <speciesReference species="M_diphosphate_c" stoichiometry="1" constant="true"/>
              <speciesReference species="M_biotinyl-CoA_c" stoichiometry="1" constant="true"/>
            </listOfProducts>
          </reaction>
       </listOfReactions>
</model>
</sbml>

There will be an issue as the metabolite ID in the seed file is BIOTIN_c whereas in the metabolic network, it is M_BIOTIN_c. Also, if you give only Biotin, it will not be enough to activate this reaction as it also requires ATP and CoA.

Best regards, Arnaud.

ggmirandac commented 1 week ago

OHHHHHHH

Now it works. Amazing, thank you so much. That was the main issue I didn't put the 'M_' in the txt file to create the seeds. Thank you so much.