opencobra / memote

memote – the genome-scale metabolic model test suite
https://memote.readthedocs.io/
Apache License 2.0
125 stars 26 forks source link

Detection of species identifiers #482

Open jjkoehorst opened 6 years ago

jjkoehorst commented 6 years ago

A model that I just evaluated contains the following information for a given metabolite:

      <sbml:species boundaryCondition="false" constant="false" hasOnlySubstanceUnits="false" id="C_13PDG" name="1,3-Bisphospho-D-glycerate" compartment="c" fbc:chemicalFormula="C3H8O10P2">
        <sbml:annotation>
          <rdf:RDF>
            <rdf:Description rdf:about="#13PDG">
              <bqbiol:is>
                <rdf:Bag>
                  <rdf:li rdf:resource="http://identifiers.org/chebi/CHEBI:16001"/>
                  <rdf:li rdf:resource="http://identifiers.org/kegg.compound/C00236"/>
                  <rdf:li rdf:resource="http://identifiers.org/inchi/InChI=1S/C3H8O10P2/c4-2(1-12-14(6,7)8)3(5)13-15(9,10)11/h2,4H,1H2,(H2,6,7,8)(H2,9,10,11)/t2-/m1/s1"/>
                </rdf:Bag>
              </bqbiol:is>
            </rdf:Description>
          </rdf:RDF>
        </sbml:annotation>
      </sbml:species>

This however results 0% chebi / etc.. mapping.

What is happening here?

ChristianLieven commented 6 years ago

Hm that shouldn't happen :S. Could you provide a link to the model or check if the annotation attribute in cobrapy is empty?

I have a suspicion that this error might be on the cobra side, so I'd like to exclude that as a possibility.

I'd be happy to check up on it if the model is accessible.

jjkoehorst commented 6 years ago

The model is currently under review. I will see if I can find a minimalistic model and add this to it to test it further.

jjkoehorst commented 6 years ago

I have added the part to a default memote model. after running memote validation it stays at 0%. Not sure if my example is wrong but if you could check it it would be great! Had to update the first line for prefixes as well.

memote.txt

Line 123 contains the compound info

Update:

Part of SBML file

<sbml:listOfSpecies>
      <sbml:species boundaryCondition="false" constant="false" hasOnlySubstanceUnits="false" id="M_13GLUCAN" name="XXXXXXX1,3-beta-D-GlucanXXXXXXXXXXXXXX" compartment="c" fbc:chemicalFormula="C12H20O10">
        <sbml:annotation>
          <rdf:RDF>
            <rdf:Description rdf:about="#13GLUCAN">
              <bqbiol:is>
                <rdf:Bag>
                  <rdf:li rdf:resource="http://identifiers.org/inchi/InChI=1S/C18H32O16/c19-1-4-7(22)10(25)11(26)17(31-4)34-15-9(24)6(3-21)32-18(13(15)28)33-14-8(23)5(2-20)30-16(29)12(14)27/h4-29H,1-3H2/t4-,5-,6-,7-,8-,9-,10+,11-,12-,13-,14+,15+,16-,17+,18+/m1/s1"/>
                  <rdf:li rdf:resource="http://identifiers.org/chebi/CHEBI:37671"/>
                  <rdf:li rdf:resource="http://identifiers.org/kegg.compound/C00965"/>
                </rdf:Bag>
              </bqbiol:is>
            </rdf:Description>
          </rdf:RDF>
        </sbml:annotation>
      </sbml:species>

screen shot 2018-08-15 at 17 06 36

Does indeed not contain annotation information.

jjkoehorst commented 6 years ago

This is the most minimal example I got get which loads but does not show any annotation. Ill have to dive more into cobrapy as it seems that the problem is in there:

<sbml xmlns:bqbiol="http://biomodels.net/biology-qualifiers/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:fbc="http://www.sbml.org/sbml/level3/version1/fbc/version2" level="3" sboTerm="SBO:0000624" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" fbc:required="false">
  <model fbc:strict="true" id="Ecoli_core_model">
    <listOfUnitDefinitions>
      <unitDefinition id="mmol_per_gDW_per_hr">
        <listOfUnits>
          <unit exponent="1" kind="mole" multiplier="1" scale="-3"/>
          <unit exponent="-1" kind="gram" multiplier="1" scale="0"/>
          <unit exponent="-1" kind="second" multiplier="3600" scale="0"/>
        </listOfUnits>
      </unitDefinition>
    </listOfUnitDefinitions>
    <fbc:listOfObjectives fbc:activeObjective="obj">
      <fbc:objective fbc:id="obj" fbc:type="maximize">
        <fbc:listOfFluxObjectives>
        </fbc:listOfFluxObjectives>
      </fbc:objective>
    </fbc:listOfObjectives>
    <listOfParameters>
      <parameter constant="true" id="cobra_default_lb" sboTerm="SBO:0000626" units="mmol_per_gDW_per_hr" value="-1000"/>
      <parameter constant="true" id="cobra_default_ub" sboTerm="SBO:0000626" units="mmol_per_gDW_per_hr" value="1000"/>
      <parameter constant="true" id="cobra_0_bound" sboTerm="SBO:0000626" units="mmol_per_gDW_per_hr" value="0"/>
      <parameter constant="true" id="R_ATPM_lower_bound" sboTerm="SBO:0000625" units="mmol_per_gDW_per_hr" value="8.39"/>
      <parameter constant="true" id="R_EX_glc_e_lower_bound" sboTerm="SBO:0000625" units="mmol_per_gDW_per_hr" value="-10"/>
    </listOfParameters>
    <listOfCompartments>
      <compartment constant="true" id="c" name="Cytoplasm"/>
      <compartment constant="true" id="e" name="Extracellular"/>
    </listOfCompartments>
    <listOfSpecies>
      <species boundaryCondition="false" constant="false" hasOnlySubstanceUnits="false" id="C_13PDG" name="1,3-Bisphospho-D-glycerate" compartment="c" fbc:chemicalFormula="C3H8O10P2">
        <annotation>
          <rdf:RDF>
            <rdf:Description rdf:about="#13PDG">
              <bqbiol:is>
                <rdf:Bag>
                  <rdf:li rdf:resource="http://identifiers.org/chebi/CHEBI:16001"/>
                  <rdf:li rdf:resource="http://identifiers.org/kegg.compound/C00236"/>
                  <rdf:li rdf:resource="http://identifiers.org/inchi/InChI=1S/C3H8O10P2/c4-2(1-12-14(6,7)8)3(5)13-15(9,10)11/h2,4H,1H2,(H2,6,7,8)(H2,9,10,11)/t2-/m1/s1"/>
                </rdf:Bag>
              </bqbiol:is>
            </rdf:Description>
          </rdf:RDF>
        </annotation>
      </species>
    </listOfSpecies>
    <fbc:listOfGeneProducts>
    </fbc:listOfGeneProducts>
    <listOfReactions>
    </listOfReactions>
  </model>
</sbml>
jjkoehorst commented 6 years ago

Ok small update, there is something wrong with the header

<sbml xmlns:fbc="http://www.sbml.org/sbml/level3/version1/fbc/version2" level="3" sboTerm="SBO:0000624" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" fbc:required="false">

Sorry for the many edits but it seems to be related to

fbc:required="false">

Any idea why this is obligatory for annotation?

Midnighter commented 6 years ago

Any SBML-parsing related issues I would re-investigate after https://github.com/opencobra/cobrapy/pull/685 has been merged. I apologize if that's not very satisfying right now but it's the most sane option for us since there are quite a number of known issues with SBML.