tlubitz / SBtab

SBtab - Table format for Systems Biology:
www.sbtab.net
MIT License
6 stars 8 forks source link

SBtab to SBML conversion does not save references #114

Open DanielRoodzant opened 2 years ago

DanielRoodzant commented 2 years ago

Hi, I encountered a problem when using the SBtab to SBML converter. When converting a file containing references to SBML. The converter does not include the references in the SBML and some valuable information gets lost. I used the following SBtab file containing DOI references.:

!!!SBtab Document="liver_bile_template"
!!SBtab TableID="t_1" SBtabVersion="1.0" Document="Liver Bile Synthesis Test Example" TableType="Reaction" TableName="Reaction"
!Comment    !ReferenceName  !ReferencePubMed    !ReferenceDOI   !Description    !Modifier   !Name   !Type   !Symbol !ID !SBML:reaction:id   !ReactionFormula    !Location   !Enzyme !Model  !Pathway    !SubreactionOf  !IsComplete !IsReversible   !IsInEquilibrium    !IsExchangeReaction !Flux   !IsNonEnzymatic !KineticLaw !Gene   !Operon !Enzyme:SBML:species:id !Enzyme:SBML:parameter:id   !BuildReaction  !BuildEnzyme    !BuildEnzymeProduction  !SBOTerm    !Identifiers
            https://doi.org/10.1016/j.livres.2017.05.001            CYP7A1  Enzyme      R_CYP7A1        C_cholesterol <=> C_E7aHOcholesterol    Liver   E_CYP7A1                    FALSE                                                       
            https://doi.org/10.1016/j.livres.2017.05.001            3?-HSO  Enzyme      R_E3BHSO        C_E7aHOcholesterol <=> C_E7aHO4cholesten3one    Liver   E_E3BHSO            R_CYP7A1        FALSE                                                       
            https://doi.org/10.1016/j.livres.2017.05.001            CYP8B1  Enzyme      R_CYP8B1        C_E7aHO4cholesten3one <=> C_E7a12aOH24cholesten3one Liver   E_CYP8B1            R_E3BHSO        FALSE                                                       
            https://doi.org/10.1016/j.livres.2017.05.001            CYP27A1 Enzyme      R_CYP27A1       C_E7a12aOH24cholesten3one <=> C_E3a7a12aHO35Bcholestenoicacid   Liver   E_CYP27A1           R_CYP8B1        FALSE                                                       
            https://doi.org/10.1016/j.livres.2017.05.001            NA  Enzyme      R_NA        C_E3a7a12aHO35Bcholestenoicacid <=> C_E3a7a12aHO3cholanoicacid  Liver   E_NA            R_CYP27A1       FALSE                                                       
            https://doi.org/10.1016/j.livres.2017.05.001            BSH Enzyme      R_BSH       C_E3a7a12aHO3cholanoicacid <=> C_CA Ileum   E_BSH           R_NA        FALSE                                                       
            https://doi.org/10.1016/j.livres.2017.05.001            7a-de-HO-ase    Enzyme      R_E7adeHOase        C_CA <=> C_DCA  Colon   E_E7adeHOase            R_BSH       FALSE                                                       

!!SBtab TableID="t_2" SBtabVersion="1.0" Document="Liver Bile Synthesis Test Example" TableType="Compound" TableName="Compound"
!Comment    !ReferenceName  !ReferencePubMed    !ReferenceDOI   !Description    !Name   !Type   !Symbol !ID !SBML:species:id    !SBML:speciestype:id    !InitialValue   !Unit   !Location   !State  !CompoundSumFormula !StructureFormula   !Charge !Mass   !IsConstant !EnzymeRole !RegulatorRole  !SBOTerm    !Identifiers
            https://doi.org/10.1016/j.livres.2017.05.001        cholesterol         C_cholesterol                   Liver               0       FALSE   converts            
            https://doi.org/10.1016/j.livres.2017.05.001        7a-HO-cholesterol           C_E7aHOcholesterol                  Liver               0       FALSE   converts            
            https://doi.org/10.1016/j.livres.2017.05.001        7a-HO-4-cholesten-3-one         C_E7aHO4cholesten3one                   Liver               0       FALSE   synthesizes         
            https://doi.org/10.1016/j.livres.2017.05.001        7a, 12a-(OH)2-4-cholesten-3-one         C_E7a12aOH24cholesten3one                   Liver               0       FALSE   oxidates            
            https://doi.org/10.1016/j.livres.2017.05.001        3a, 7a, 12a-(HO)3-5B-cholestenoic_acid          C_E3a7a12aHO35Bcholestenoicacid                 Liver               0       FALSE   conjugates          
            https://doi.org/10.1016/j.livres.2017.05.001        3a,7a,12a-(HO)3-cholanoic_acid (cholic_acis) (TCA)          C_E3a7a12aHO3cholanoicacid                  Liver               0       FALSE   deconjugates            
            https://doi.org/10.1016/j.livres.2017.05.001        CA          C_CA                    Ileum               0       FALSE   converts            
            https://doi.org/10.1016/j.livres.2017.05.001        DCA         C_DCA                   Colon               0       FALSE               

!!SBtab TableID="t_3" SBtabVersion="1.0" Document="Liver Bile Synthesis Test Example" TableType="Enzyme" TableName="Enzyme"
!Comment    !ReferenceName  !ReferencePubMed    !ReferenceDOI   !Description    !Name   !Type   !Symbol !ID !CatalysedReaction  !KineticLaw !Pathway    !Gene   !Identifiers
            https://doi.org/10.1016/j.livres.2017.05.001        CYP7A1  Enzyme      E_CYP7A1    R_CYP7A1                
            https://doi.org/10.1016/j.livres.2017.05.001        3?-HSO  Enzyme      E_E3BHSO    R_E3BHSO                
            https://doi.org/10.1016/j.livres.2017.05.001        CYP8B1  Enzyme      E_CYP8B1    R_CYP8B1                
            https://doi.org/10.1016/j.livres.2017.05.001        CYP27A1 Enzyme      E_CYP27A1   R_CYP27A1               
            https://doi.org/10.1016/j.livres.2017.05.001        NA  Enzyme      E_NA    R_NA                
            https://doi.org/10.1016/j.livres.2017.05.001        BSH Enzyme      E_BSH   R_BSH               
            https://doi.org/10.1016/j.livres.2017.05.001        7a-de-HO-ase    Enzyme      E_E7adeHOase    R_E7adeHOase                

!!SBtab TableID="t_4" SBtabVersion="1.0" Document="Liver Bile Synthesis Test Example" TableType="Compartment" TableName="Compartment"
!Comment    !ReferenceName  !ReferencePubMed    !ReferenceDOI   !Description    !Name   !Type   !Symbol !ID !SBML:compartment:id    !OuterCompartment   !OuterCompartment:SBML:compartment:id   !Size   !Unit   !SBOTerm    !Identifiers
            https://doi.org/10.1016/j.livres.2017.05.001        Liver           Liver               1.0         
            https://doi.org/10.1016/j.livres.2017.05.001        Ileum           Ileum               1.0         
            https://doi.org/10.1016/j.livres.2017.05.001        Colon           Colon               1.0         

This produced the following SBML:

<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level2/version4" level="2" version="4">
  <model id="liver_bile_template" name="liver_bile_template">
    <listOfCompartments>
      <compartment id="Liver" name="Liver" size="1" constant="true"/>
      <compartment id="Ileum" name="Ileum" size="1" constant="true"/>
      <compartment id="Colon" name="Colon" size="1" constant="true"/>
    </listOfCompartments>
    <listOfSpecies>
      <species id="C_cholesterol" name="cholesterol" compartment="Liver" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
      <species id="C_E7aHOcholesterol" name="7a-HO-cholesterol" compartment="Liver" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
      <species id="C_E7aHO4cholesten3one" name="7a-HO-4-cholesten-3-one" compartment="Liver" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
      <species id="C_E7a12aOH24cholesten3one" name="7a, 12a-(OH)2-4-cholesten-3-one" compartment="Liver" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
      <species id="C_E3a7a12aHO35Bcholestenoicacid" name="3a, 7a, 12a-(HO)3-5B-cholestenoic_acid" compartment="Liver" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
      <species id="C_E3a7a12aHO3cholanoicacid" name="3a,7a,12a-(HO)3-cholanoic_acid (cholic_acis) (TCA)" compartment="Liver" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
      <species id="C_CA" name="CA" compartment="Ileum" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
      <species id="C_DCA" name="DCA" compartment="Colon" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
    </listOfSpecies>
    <listOfReactions>
      <reaction id="R_CYP7A1" name="CYP7A1" reversible="false" fast="false">
        <listOfReactants>
          <speciesReference species="C_cholesterol" stoichiometry="1"/>
        </listOfReactants>
        <listOfProducts>
          <speciesReference species="C_E7aHOcholesterol" stoichiometry="1"/>
        </listOfProducts>
      </reaction>
      <reaction id="R_E3BHSO" name="3?-HSO" reversible="false" fast="false">
        <listOfReactants>
          <speciesReference species="C_E7aHOcholesterol" stoichiometry="1"/>
        </listOfReactants>
        <listOfProducts>
          <speciesReference species="C_E7aHO4cholesten3one" stoichiometry="1"/>
        </listOfProducts>
      </reaction>
      <reaction id="R_CYP8B1" name="CYP8B1" reversible="false" fast="false">
        <listOfReactants>
          <speciesReference species="C_E7aHO4cholesten3one" stoichiometry="1"/>
        </listOfReactants>
        <listOfProducts>
          <speciesReference species="C_E7a12aOH24cholesten3one" stoichiometry="1"/>
        </listOfProducts>
      </reaction>
      <reaction id="R_CYP27A1" name="CYP27A1" reversible="false" fast="false">
        <listOfReactants>
          <speciesReference species="C_E7a12aOH24cholesten3one" stoichiometry="1"/>
        </listOfReactants>
        <listOfProducts>
          <speciesReference species="C_E3a7a12aHO35Bcholestenoicacid" stoichiometry="1"/>
        </listOfProducts>
      </reaction>
      <reaction id="R_NA" name="NA" reversible="false" fast="false">
        <listOfReactants>
          <speciesReference species="C_E3a7a12aHO35Bcholestenoicacid" stoichiometry="1"/>
        </listOfReactants>
        <listOfProducts>
          <speciesReference species="C_E3a7a12aHO3cholanoicacid" stoichiometry="1"/>
        </listOfProducts>
      </reaction>
      <reaction id="R_BSH" name="BSH" reversible="false" fast="false">
        <listOfReactants>
          <speciesReference species="C_E3a7a12aHO3cholanoicacid" stoichiometry="1"/>
        </listOfReactants>
        <listOfProducts>
          <speciesReference species="C_CA" stoichiometry="1"/>
        </listOfProducts>
      </reaction>
      <reaction id="R_E7adeHOase" name="7a-de-HO-ase" reversible="false" fast="false">
        <listOfReactants>
          <speciesReference species="C_CA" stoichiometry="1"/>
        </listOfReactants>
        <listOfProducts>
          <speciesReference species="C_DCA" stoichiometry="1"/>
        </listOfProducts>
      </reaction>
    </listOfReactions>
  </model>
</sbml>

The references are now no longer a part of the data. As well as some other information. For good reproducibility I would like to be able to keep all information filled into the SBtab when converting it to SBML and back.