Subsystems not recognized by getModelSubSystems()

90 views
Skip to first unread message

Michel_Lavoie

unread,
Sep 26, 2018, 2:57:03 PM9/26/18
to COBRA Toolbox
Hi all,
        I am looking at a cobra model (called pti) of a phytoplanktonic species with a list of subsystems. However, it appears that the field pti.subsystems cannot be printed with the function getModelSubSystems(pti). When I run the function (se below), I get an array of letters and strange characters. I noticed that the subsystems, which can be found in the table in matlab (in the field pti.subSystems), were not enclosed with apostrophes, although when I type pti.subSystems, I can print all the subSystems associated with all reactions. No matter if I add apostrophe at the start and at the end of the subsystems, it does not solve the problem and the function getModelSubSystems() does not work. Would you have any idea to solve this?

Thank you very much,
Michel

>> getModelSubSystems(pti)

ans =

  55×1 char array

    ' '
    '''
    '('
    ')'
    ','
    '-'
    '/'
    '1'
    '3'
    '6'
    ':'
    ';'
    'A'
    'B'
    'C'
    'D'
    'E'
    'F'
    'G'
    'H'
    'I'
    'L'
    'M'
    'N'
    'O'
    'P'
    'R'
    'S'
    'T'
    'U'
    'V'
    'a'
    'b'
    'c'
    'd'
    'e'
    'f'
    'g'
    'h'
    'i'
    'k'
    'l'
    'm'
    'n'
    'o'
    'p'
    'q'
    'r'
    's'
    't'
    'u'
    'v'
    'w'
    'x'
    'y'


You can see below the 'SystemConfigReport'.


>> generateSystemConfigReport

 

 > ---------------------------------- SYSTEM CONFIGURATION REPORT ----------------------------------

 

 

      _____   _____   _____   _____     _____     |

     /  ___| /  _  \ |  _  \ |  _  \   / ___ \    |   COnstraint-Based Reconstruction and Analysis

     | |     | | | | | |_| | | |_| |  | |___| |   |   The COBRA Toolbox - 2018

     | |     | | | | |  _  { |  _  /  |  ___  |   |

     | |___  | |_| | | |_| | | | \ \  | |   | |   |   Documentation:

     \_____| \_____/ |_____/ |_|  \_\ |_|   |_|   |   http://opencobra.github.io/cobratoolbox

                                                  |

 

 > Checking if git is installed ...  Done.

 > Checking if the repository is tracked using git ...  Done.

 > Checking if curl is installed ...  Done.

 > Checking if remote can be reached ...  Done.

 > Initializing and updating submodules (this may take a while)... Done.

 > Adding all the files of The COBRA Toolbox ...  Done.

 > Define CB map output... set to svg.

 > TranslateSBML is installed and working properly.

 > Configuring solver environment variables ...

   - [----] ILOG_CPLEX_PATH: --> set this path manually after installing the solver ( see instructions )

   - [*---] GUROBI_PATH: /Library/gurobi752/mac64/matlab

   - [----] TOMLAB_PATH: --> set this path manually after installing the solver ( see instructions )

   - [----] MOSEK_PATH: --> set this path manually after installing the solver ( see instructions )

   Done.

 > Checking available solvers and solver interfaces ... Done.

 > Setting default solvers ... Done.

 > Saving the MATLAB path ... Done.

   - The MATLAB path was saved in the default location.

 

 > Summary of available solvers and solver interfaces

 

                                    Support               LP       MILP       QP      MIQP     NLP

            ----------------------------------------------------------------------

            gurobi               active                    1           1           1           1           -

            ibm_cplex         active                    0           0           0           -            -

            tomlab_cplex   active                    0           0           0           0           -

            glpk                   active                    1           1           -            -            -

            mosek               active                    0           -            0           -            -

            matlab               active                    1           -            -            -            1

            cplex_direct     active                    0           0           0           0           -

            dqqMinos          active                    1           -            -            -            -

            pdco                  active                    1           -            1           -            -

            quadMinos        active                    1           -            -            -            -

            qpng                  passive                  -            -            1           -            -

            tomlab_snopt   passive                  -            -            -            -            0

            gurobi_mex      legacy                    0           0           0           0           -

            lindo_old          legacy                    0           -            -            -            -

            lindo_legacy     legacy                    0           -            -            -            -

            lp_solve            legacy                    1           -            -            -            -

            opti                   legacy                    0           0           0           0           0

            ----------------------------------------------------------------------

            Total                  -                 7           2           3           1           1

 

 + Legend: - = not applicable, 0 = solver not compatible or not installed, 1 = solver installed.

 

 

 > You can solve LP problems using: 'gurobi' - 'glpk' - 'matlab' - 'dqqMinos' - 'pdco' - 'quadMinos' - 'lp_solve'

 > You can solve MILP problems using: 'gurobi' - 'glpk'

 > You can solve QP problems using: 'gurobi' - 'pdco' - 'qpng'

 > You can solve MIQP problems using: 'gurobi'

 > You can solve NLP problems using: 'matlab'

 

 > Checking for available updates ...

 > There are 6429 new commit(s) on <master> and 0 new commit(s) on <develop> [c72a7b @ master]

 > You can update The COBRA Toolbox by running updateCobraToolbox() (from within MATLAB).

Elapsed time is 143.438534 seconds.

 

-----------------------------------------------------------------------------------------------------

MATLAB Version: 9.4.0.813654 (R2018a)

MATLAB License Number: 310290

Operating System: Mac OS X  Version: 10.13.6 Build: 17G65

Java Version: Java 1.8.0_144-b01 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode

-----------------------------------------------------------------------------------------------------

MATLAB                                                Version 9.4         (R2018a)

Simulink                                              Version 9.1         (R2018a)

Aerospace Toolbox                                     Version 2.21        (R2018a)

Bioinformatics Toolbox                                Version 4.10        (R2018a)

Communications System Toolbox                         Version 6.6         (R2018a)

Computer Vision System Toolbox                        Version 8.1         (R2018a)

Control System Toolbox                                Version 10.4        (R2018a)

Curve Fitting Toolbox                                 Version 3.5.7       (R2018a)

DSP System Toolbox                                    Version 9.6         (R2018a)

Database Toolbox                                      Version 8.1         (R2018a)

Embedded Coder                                        Version 7.0         (R2018a)

Financial Toolbox                                     Version 5.11        (R2018a)

Fixed-Point Designer                                  Version 6.1         (R2018a)

Fuzzy Logic Toolbox                                   Version 2.3.1       (R2018a)

Global Optimization Toolbox                           Version 3.4.4       (R2018a)

Image Acquisition Toolbox                             Version 5.4         (R2018a)

Image Processing Toolbox                              Version 10.2        (R2018a)

Instrument Control Toolbox                            Version 3.13        (R2018a)

MATLAB Coder                                          Version 4.0         (R2018a)

MATLAB Compiler                                       Version 6.6         (R2018a)

MATLAB Compiler SDK                                   Version 6.5         (R2018a)

Mapping Toolbox                                       Version 4.6         (R2018a)

Model Predictive Control Toolbox                      Version 6.1         (R2018a)

Neural Network Toolbox                                Version 11.1        (R2018a)

Optimization Toolbox                                  Version 8.1         (R2018a)

Parallel Computing Toolbox                            Version 6.12        (R2018a)

Partial Differential Equation Toolbox                 Version 3.0         (R2018a)

RF Toolbox                                            Version 3.4         (R2018a)

Robust Control Toolbox                                Version 6.4.1       (R2018a)

Signal Processing Toolbox                             Version 8.0         (R2018a)

Simscape                                              Version 4.4         (R2018a)

Simscape Multibody                                    Version 5.2         (R2018a)

Simscape Power Systems                                Version 6.9         (R2018a)

Simulink Coder                                        Version 8.14        (R2018a)

Simulink Control Design                               Version 5.1         (R2018a)

Simulink Desktop Real-Time                            Version 5.6         (R2018a)

Statistics and Machine Learning Toolbox               Version 11.3        (R2018a)

Symbolic Math Toolbox                                 Version 8.1         (R2018a)

System Identification Toolbox                         Version 9.8         (R2018a)

Wavelet Toolbox                                       Version 5.0         (R2018a)

 

 > Default shell       :        /bin/bash

 > Version of shell    :        GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin17)

Copyright (C) 2007 Free Software Foundation, Inc.

 > Architecture        :        MACI64

 > MATLAB folder       :        /Applications/MATLAB_R2018a.app

 > COBRA Toolbox root  :        /Users/mlavoie/cobratoolbox

 > git version         :        git version 2.15.2 (Apple Git-101.1)

 > curl version        :        curl 7.54.0 (x86_64-apple-darwin17.0)

 > CBT_LP_SOLVER       :        gurobi

 > CBT_MILP_SOLVER     :        gurobi

 > CBT_QP_SOLVER       :        gurobi

 > CBT_MIQP_SOLVER     :        gurobi

 > CBT_NLP_SOLVER      :        matlab

 > GUROBI_PATH         :        /Library/gurobi752/mac64/matlab

 > ILOG_CPLEX_PATH     :        

 > TOMLAB_PATH         :       

 > MOSEK_PATH          :       

 

 > ----------------------------------- END OF CONFIGURATION REPORT -----------------------------------

 

Thomas Pfau

unread,
Sep 27, 2018, 1:02:19 AM9/27/18
to cobra-...@googlegroups.com

Dear Michel,

Where did you obtain that model from and how did you import the model.

The output you get looks very much as if the model does not adhere to the model field definitions, and was not loaded via readCbModel.

Best

Thomas



On 2018-09-26 20:57, 'Michel_Lavoie' via COBRA Toolbox wrote:

Unsubscribe

It appears that you have subscribed to commercial messages from this sender. To stop receiving such messages from this sender, please unsubscribe

--

---
You received this message because you are subscribed to the Google Groups "COBRA Toolbox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cobra-toolbo...@googlegroups.com.
For more options, visit http://secure-web.cisco.com/18UjfnOAP53ChiNF4lRHmuwkJWwBsuTDHnf_H4ujIZsor3zYbCUaJj55LrbHMJsvp45XiJ5VR88OgdNH_TwYWXlbGhgNDffU2n3BNMzdmUgRR3l1ezljumJRxCYbRYBcKKBcNRbtqeolYYaVYoT9_T1U8TxJchpbFLzDDAgZMIMJp30Li6iirjx_sunvnQpysfrGPR_V052LfKl16G41dhHkLMlztXtd8q6Eb4KfXe1Vq5u60OdB0Za_F-LfTnByBKdEerEvZFNIrgPFuBbt8XWAImGZtz_NvtK8f98ljbjGYHJXjRe6UicHSCLC-OZ6btN7MQDoEq_-GKod6FhvtR0zPYFp4bqLwbtfBim0D3bt5_EoPSO7jyZDzZkIIijgw544-PPhWR1FbR8r21WqK7k3Qhk_mUc9umFdfz9Mxk5SGRi4XvCYyWckN3Nb0kdM3/l34%3Ahttps%3A%2F%2Fgroups.google.com%2Fd%2Foptoute.

-- 
Université du Luxembourg
Faculté des Sciences, de la Technologie et de la Communication
Campus Belval, Biotech II 115
6 avenue du Swing
L-4367 Belvaux
Tel: (+352) 46 66 44 5309
Email: thoma...@uni.lu

Michel_Lavoie

unread,
Sep 27, 2018, 6:06:12 AM9/27/18
to COBRA Toolbox
Hi Thomas,
       I found the model (iLB1025.mat) from the supplemental information of a publication (Levering et al 2016). Then, I loaded the model using the command load('iLB1025.mat') and was not able to get Subsystems with the command 'getModelSubSystems'. I also tried to read the model (iLB1025.xml) with the function 'readCbModel()' (see below) and then look at the subsystems, but in this case, I can see in the table (the field model.subSystems) that there are no subSystems and the function does not work. I think this is normal because in the .xml file there are no subsystems. I attached both files to this message. You can download the files in the supporting information S3 zip file at : https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4859558/. I could not attach the files to this message since I got an error message. Would you know how to fix this problem?
Thanks,
Michel

>> model = readCbModel('iLB1025.xml')
The model contains 17 errors.

Error encountered during read.


model = 

  struct with fields:

               S: [1704×2156 double]
            mets: {1704×1 cell}
               b: [1704×1 double]
          csense: [1704×1 char]
            rxns: {2156×1 cell}
              lb: [2156×1 double]
              ub: [2156×1 double]
               c: [2156×1 double]
       osenseStr: 'max'
           genes: {1025×1 cell}
           rules: {2156×1 cell}
       geneNames: {1025×1 cell}
       compNames: {6×1 cell}
           comps: {6×1 cell}
        proteins: {1025×1 cell}
      metCharges: [1704×1 double]
     metFormulas: {1704×1 cell}
        metNames: {1704×1 cell}
        rxnNames: {2156×1 cell}
      subSystems: {2156×1 cell}
     description: 'iLB1025.xml'
    modelVersion: [1×1 struct]
         modelID: 'pti'

>> getModelSubSystems(model)

ans =

  0×0 empty cell array
To unsubscribe from this group and stop receiving emails from it, send an email to cobra-toolbox+unsubscribe@googlegroups.com.

Thomas Pfau

unread,
Sep 27, 2018, 6:20:24 AM9/27/18
to cobra-...@googlegroups.com

Dear Michel,

Please always load models (also .mat models) using readCbModel (yes, the function can read .mat files).
There are plenty of models around which have sometimes very odd fields and readCbModel does take care of most of the known problems. If you use load, it is very likely that your model struct will not be compatible with the Toolbox.

Best

Thomas

To unsubscribe from this group and stop receiving emails from it, send an email to cobra-toolbo...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thomas Pfau

unread,
Sep 27, 2018, 6:35:56 AM9/27/18
to cobra-...@googlegroups.com

Dear Michel,

I had a look at the model:

One issue is that the metCHEBIID field in the model has inconsistent formats (empty strings and numbers) which are not currently handled by the toolbox.

I submitted a PR to add this adjustment to readCbModel.

Until that is in, I would suggest to run convertOldStyleModel on the loaded model (loaded with load), as readCbModel will reject the model. The model will still not pass verifyModel because of the metChEBIID field, but you can use it for most purposes.

Best

Thomas

Michel_Lavoie

unread,
Sep 27, 2018, 6:41:37 AM9/27/18
to COBRA Toolbox
Hi Thomas, 
             I tried the function 'readCbModel()' to read a .mat file and it did not work (see below) even though when I load the model using load() I can do flux balance analysis and the model seems functional.

>> model = readCbModel('iLB1025bon.mat')
Error using readCbModel (line 229)
There were no valid models in the mat file.\n Please load the model manually via ' load iLB1025bon.mat'
and check it with verifyModel() to validate it

I just saw your new email telling me to try 'convertOldStyleModel()'. I tried it (see below) and it seems to work !!! 
Thank you very much Thomas for your very valuable help,
Michel

>> pti = convertOldStyleModel(pti)

pti = 

  struct with fields:

                     id: 'iLB1025'
            description: 'Metabolic network reconstruction of Phaeodactylum tricornutum'
                   rxns: {2156×1 cell}
               rxnNames: {2156×1 cell}
                grRules: {2156×1 cell}
                  rules: {2156×1 cell}
                      c: [2156×1 double]
                      S: [1704×2156 double]
                     lb: [2156×1 double]
                     ub: [2156×1 double]
             subSystems: {2156×1 cell}
           rxnECNumbers: {2156×1 cell}
              rxnKEGGID: {2156×1 cell}
               rxnNotes: {2156×1 cell}
     proteinAssociation: {2156×1 cell}
       rxnsLocalization: {2156×1 cell}
          rxnReferences: {2156×1 cell}
             rxnGeneMat: [2156×1025 double]
                  genes: {1025×1 cell}
                   mets: {1704×1 cell}
               metNames: {1704×1 cell}
               metComps: [1704×1 double]
            metFormulas: {1704×1 cell}
              metKEGGID: {1704×1 cell}
             metChEBIID: {1704×1 cell}
         metInChIString: {1704×1 cell}
                      b: [1704×1 double]
                  comps: {6×1 cell}
              compNames: {6×1 cell}
    rxnConfidenceScores: [2156×1 double]
             metCharges: [1704×1 double]
              osenseStr: 'max'
                 csense: [1704×1 char]

>> getModelSubSystems(pti)

ans =

  89×1 cell array

    {'Aldehyde degradation'                                                   }
    {'Amino acid metabolism: Alanine, Aspartate and Glutamate metabolism'     }
    {'Amino acid metabolism: Aminoacyl-tRNA biosynthesis'                     }
    {'Amino acid metabolism: Asparagine metabolism'                           }
    {'Amino acid metabolism: Cysteine and Methionine metabolism'              }
    {'Amino acid metabolism: Glycine, Serine and Threonine metabolism'        }
    {'Amino acid metabolism: Histidine metabolism'                            }
    {'Amino acid metabolism: Homocysteine biosynthesis'                       }
    {'Amino acid metabolism: Homoserine biosynthesis'                         }
    {'Amino acid metabolism: Lysine biosynthesis'                             }
    {'Amino acid metabolism: Lysine degradation'                              }
    {'Amino acid metabolism: Phenylalanine metabolism'                        }
    {'Amino acid metabolism: Phenylalanine, Tyrosine, Tryptophan biosynthesis'}
    {'Amino acid metabolism: Proline and Arginine metabolism'                 }
    {'Amino acid metabolism: Tryptophan metabolism'                           }
    {'Amino acid metabolism: Tyrosine metabolism'                             }
    {'Amino acid metabolism: Valine, Leucine and Isoleucine biosynthesis'     }
    {'Amino acid metabolism: Valine, Leucine and Isoleucine degradation'      }
    {'Amino sugar metabolism'                                                 }
    {'Ascorbate metabolism'                                                   }
    {'Betaine lipid biosynthesis'                                             }
    {'Biosynthesis of steroids: Steroid synthesis'                            }
    {'Biosynthesis of steroids: Terpenoid backbone synthesis'                 }
    {'Biosynthesis of steroids: Ubiquinone/Terpenoid-quinone biosynthesis'    }
    {'Butanoate metabolism'                                                   }
    {'Calvin-Benson cycle'                                                    }
    {'Carbon fixation'                                                        }
    {'Cardiolipin biosynthesis'                                               }
    {'Carotenoid biosynthesis'                                                }
    {'Cofactor biosynthesis: Biotin biosynthesis'                             }
    {'Cofactor biosynthesis: Carnitine biosynthesis'                          }
    {'Cofactor biosynthesis: Folate biosynthesis'                             }
    {'Cofactor biosynthesis: Lipoate biosynthesis'                            }
    {'Cofactor biosynthesis: Nicotinate and Nicotinamide metabolism'          }
    {'Cofactor biosynthesis: Pantothenate and CoA biosynthesis'               }
    {'Cofactor biosynthesis: Regeneration'                                    }
    {'Cofactor biosynthesis: Riboflavin biosynthesis'                         }
    {'Cofactor biosynthesis: Thiamine (B1)'                                   }
    {'Cofactor biosynthesis: Vitamin B6'                                      }
    {'Fatty acid biosynthesis'                                                }
    {'Fatty acid biosynthesis, mitochondria'                                  }
    {'Fatty acid biosynthesis: Long chain omega-3 synthesis'                  }
    {'Fatty acid degradation, mitochondria'                                   }
    {'Fatty acid degradation, peroxisome'                                     }
    {'Fructose and mannose metabolism'                                        }
    {'Galactoglycerolipid metabolism'                                         }
    {'Galactose metabolism'                                                   }
    {'Glycolysis/Gluconeogenesis/Entner-Doudoroff pathway'                    }
    {'Glyoxylate cycle; TCA cycle; Dicarboxylate metabolism'                  }
    {'Inositol phosphate metabolism'                                          }
    {'Metabolism of other amino acids: Glutathione metabolism'                }
    {'Metabolism of other amino acids: Selenoamino acid metabolism'           }
    {'Metabolism of other amino acids: beta-Alanine metabolism'               }
    {'Modeling: ATP maintenance'                                              }
    {'Modeling: Biomass'                                                      }
    {'Modeling: Demand'                                                       }
    {'Modeling: Exchange reaction'                                            }
    {'Modeling: Sink'                                                         }
    {'N-Glycan biosynthesis'                                                  }
    {'Nitrogen metabolism'                                                    }
    {'Nucleotide metabolism: Purine metabolism'                               }
    {'Nucleotide metabolism: Pyrimidine metabolism'                           }
    {'Nucleotide sugar metabolism'                                            }
    {'Oxidative phosphorylation'                                              }
    {'Pentose interconversions'                                               }
    {'Pentose phosphate pathway'                                              }
    {'Phosphoglycerolipid metabolism'                                         }
    {'Photosynthesis'                                                         }
    {'Phylloquinone biosynthesis'                                             }
    {'Plastoquinol biosynthesis'                                              }
    {'Porphyrin and chlorophyll metabolism'                                   }
    {'Pyruvate metabolism'                                                    }
    {'Sphingolipid metabolism'                                                }
    {'Starch and sucrose metabolism'                                          }
    {'Sulfolipid biosynthesis'                                                }
    {'Sulfolipid metabolism'                                                  }
    {'Sulfur metabolism'                                                      }
    {'TCA cycle'                                                              }
    {'Transport, chloroplast'                                                 }
    {'Transport, cytosol'                                                     }
    {'Transport, extracellular'                                               }
    {'Transport, fatty acids'                                                 }
    {'Transport, mitochondria'                                                }
    {'Transport, peroxisome'                                                  }
    {'Transport, thylakoid'                                                   }
    {'Transport, triacylglycerol'                                             }
    {'Triacylglycerol biosynthesis'                                           }
    {'Triacylglycerol degradation'                                            }
    {'Urea cycle'                                                             }





 

Le jeudi 27 septembre 2018 01:02:19 UTC-4, Thomas Pfau a écrit :
To unsubscribe from this group and stop receiving emails from it, send an email to cobra-toolbox+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages