Code Monkey home page Code Monkey logo

fruitfly-gem's Introduction

Fruitfly-GEM: The generic genome-scale metabolic model of Drosophila melanogaster

GitHub version

Description

This repository contains the latest version of Fruitfly-GEM, a fruit fly genome-scale metabolic model.

Citation

H. Wang, J. L. Robinson, P. Kocabaş, J. Gustafsson, M. Anton, P.-E. Cholley, et al. Genome-scale metabolic network reconstruction of model animals as a platform for translational research. PNAS 118, e2102344118 (2021). doi.org/10.1073/pnas.2102344118

Model Keywords

Utilisation: multi-omics integrative analysis, predictive simulation Field: metabolic-network reconstruction
Type of Model: reconstruction, curated
Model source: Human-GEM
Omic source: genomics; metabolomics
Taxonomic name: Drosophila melanogaster
Taxonomy ID: 7227
Genome ID: GCA_000001215.4
Metabolic System: general metabolism
Tissue:
Bioreactor:
Cell type:
Cell line:
Condition: generic metabolism

Model Overview

Taxonomy Template Model Reactions Metabolites Genes
Drosophila melanogaster Human-GEM 11996 8121 1810

Installation

Required Software

  • A functional MATLAB installation (MATLAB 7.3 and higher).
  • The RAVEN toolbox.
  • The COBRA toolbox (not necessary for most functionality).

Dependencies - Recommended Software

Installation Instructions

Usage

Loading/saving the model

Fruitfly-GEM.mat (Recommended if on main branch)

  • Load and save using the built-in MATLAB load() and save() functions.

Fruitfly-GEM.xml (SBML format)

Websites

  • Metabolic Atlas enables visualization and exploration of Fruitfly-GEM content.

Contributing

Contributions are always welcome! Please read the contributing guidelines to get started.

fruitfly-gem's People

Contributors

haowang-bioinfo avatar johan-gson avatar jonathanrob avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fruitfly-gem's Issues

Gene IDs in `fbc:listOfGeneProducts` and `fbc:geneProductAssociation` don't match in Fruitfly-GEM.xml

Description of the issue:

The gene IDs used to define GPR in fbc:geneProductAssociation don't have the "G_" prefix, while the genes listed in fbc:listOfGeneProducts do. This mismatch causes problems when trying to use GPRs, for example, in COBRA toolbox.

Expected feature/value/output:

An example:

<fbc:geneProductAssociation>
          <fbc:geneProductRef fbc:geneProduct="CG2767"/>
</fbc:geneProductAssociation>

and

 <fbc:geneProduct metaid="CG2767" sboTerm="SBO:0000243" fbc:id="CG2767" fbc:label="CG2767"/>

Current feature/value/output:

<fbc:geneProductAssociation>
          <fbc:geneProductRef fbc:geneProduct="CG2767"/>
</fbc:geneProductAssociation>

and

 <fbc:geneProduct metaid="G_CG2767" sboTerm="SBO:0000243" fbc:id="G_CG2767" fbc:label="G_CG2767"/>

Reproducing these results:

Example of the problems encountered using COBRA toolbox:

>> model=readSBML('model/Fruitfly-GEM.xml',10);
The model contains 0 errors and 1 warnings.

>> % GPR for first reaction refers to genes number 1811 and 1812
model.rules(1)

ans =

  1×1 cell array

    {'( x(1811) | x(1812) )'}

>> % but there are only 1810  genes in the model
numel(model.genes)

ans =

        1810

>> % when trying to create the grRules field
creategrRulesField(model)
Error using regexprep
Evaluation of 'model.genes{str2num($1)}' failed:

Index exceeds the number of array elements. Index must not exceed 1810.

Error in creategrRulesField (line 46)
currentrules = regexprep(currentrules,'x\(([0-9]+)\)','${model.genes{str2num($1)}}');

I hereby confirm that I have:

  • [ x] Done this analysis in the main branch of the repository
  • [ x] Checked that a similar issue does not exist already

Failure to extract Fruitfly-GEM.xml using COBRA

Description of the issue:

Trying to parse the Fruitfly-GEM.xml but face errors:
model = cobra.io.read_sbml_model(xmlFile)

---------------------------------------------------------------------------
CobraSBMLError                            Traceback (most recent call last)
File ~/.local/lib/python3.8/site-packages/cobra/io/sbml.py:249, in read_sbml_model(filename, number, f_replace, **kwargs)
    248     doc = _get_doc_from_filename(filename)
--> 249     return _sbml_to_model(doc, number=number, f_replace=f_replace, **kwargs)
    250 except IOError as e:

File ~/.local/lib/python3.8/site-packages/cobra/io/sbml.py:522, in _sbml_to_model(doc, number, f_replace, set_missing_bounds, **kwargs)
    519 for (
    520     gp
    521 ) in model_fbc.getListOfGeneProducts():  # noqa: E501 type: libsbml.GeneProduct
--> 522     gid = _check_required(gp, gp.getIdAttribute(), "id")
    523     if f_replace and F_GENE in f_replace:

File ~/.local/lib/python3.8/site-packages/cobra/io/sbml.py:1352, in _check_required(sbase, value, attribute)
   1351         msg += " with metaId '%s'" % sbase.getName()
-> 1352     raise CobraSBMLError(msg)
   1353 if attribute == "id":

CobraSBMLError: Required attribute 'id' cannot be found or parsed in '<GeneProduct>'.

The above exception was the direct cause of the following exception:

CobraSBMLError                            Traceback (most recent call last)
Input In [8], in <cell line: 1>()
----> 1 model = cobra.io.read_sbml_model(xmlFile)

File ~/.local/lib/python3.8/site-packages/cobra/io/sbml.py:263, in read_sbml_model(filename, number, f_replace, **kwargs)
    253 except Exception as original_error:
    254     cobra_error = CobraSBMLError(
    255         "Something went wrong reading the SBML model. Most likely the SBML"
    256         " model is not valid. Please check that your model is valid using "
   (...)
    261         "at https://github.com/opencobra/cobrapy/issues ."
    262     )
--> 263     raise cobra_error from original_error

CobraSBMLError: Something went wrong reading the SBML model. Most likely the SBML model is not valid. Please check that your model is valid using the `cobra.io.sbml.validate_sbml_model` function or via the online validator at http://sbml.org/validator .
	`(model, errors) = validate_sbml_model(filename)`
If the model is valid and cannot be read please open an issue at https://github.com/opencobra/cobrapy/issues .

Then I follow the instruction and do validation

cobra.io.sbml.validate_sbml_model(xmlFile)
It renders the following:

(None,
 {'SBML_FATAL': [],
  'SBML_ERROR': ["E1 (Error): SBML component consistency (fbc, L299114); Allowed fbc attributes on <GeneProduct>; A <GeneProduct> object must have the required attributes 'fbc:id' and 'fbc:label' may have the optional attributes 'fbc:name' and 'fbc:associatedSpecies'. No other attributes from the SBML Level 3 Flux Balance Constraints namespace are permitted on a <GeneProduct> object. \nReference: L3V1 Fbc V3 Section 3.5\n Fbc attribute 'id' is missing from 'geneProduct' object.\n",
   "E3 (Error): SBML component consistency (fbc, L299114); Allowed fbc attributes on <GeneProduct>; A <GeneProduct> object must have the required attributes 'fbc:id' and 'fbc:label' may have the optional attributes 'fbc:name' and 'fbc:associatedSpecies'. No other attributes from the SBML Level 3 Flux Balance Constraints namespace are permitted on a <GeneProduct> object. \nReference: L3V1 Fbc V3 Section 3.5\n Fbc attribute 'id' is missing from 'geneProduct' object.\n"],
  'SBML_SCHEMA_ERROR': [],
  'SBML_WARNING': ['E0 (Warning): General SBML conformance (core, L3); RDF does not contain valid ModelHistory; LibSBML expected to read the annotation into a ModelHistory object. Unfortunately, some attributes were not present or correct and the resulting ModelHistory object will not correctly produce the annotation.  This functionality will be improved in later versions of libSBML. \nReference: L3V1 Section 6.3\n An invalid ModelHistory element has been stored.\n',
   'E2 (Warning): General SBML conformance (core, L3); RDF does not contain valid ModelHistory; LibSBML expected to read the annotation into a ModelHistory object. Unfortunately, some attributes were not present or correct and the resulting ModelHistory object will not correctly produce the annotation.  This functionality will be improved in later versions of libSBML. \nReference: L3V1 Section 6.3\n An invalid ModelHistory element has been stored.\n'],
  'COBRA_FATAL': [],
  'COBRA_ERROR': ["Required attribute 'id' cannot be found or parsed in '<GeneProduct>'."],
  'COBRA_WARNING': [],
  'COBRA_CHECK': []})

Expected feature/value/output:

I would expect to be able to parse the Fruitfly-GEM.xml which will have identifiers synchronized with metabolites.tsv and yml files.

Reproducing these results:

# https://cobrapy.readthedocs.io/en/latest/io.html#SBML
import cobra
import os
import requests

# Human-GEM e.g.,
model_name = 'Fruitfly-GEM'

outputfdr = f"../../output/ATLAS_collection/{model_name}"
try:
    os.makedirs(outputfdr)
except:
        None

BRANCH = 'main'
XML = os.path.join(outputfdr,f'{model_name}.xml')
with open(XML, 'w') as f:
    r = requests.get(f'https://github.com/SysBioChalmers/{model_name}/blob/' + BRANCH + f'/model/{model_name}.xml?raw=true')
    f.write(r.text)

with open(XML, 'r') as f:
    xmlFile = f.read()

model = cobra.io.read_sbml_model(xmlFile)

I hereby confirm that I have:

  • Tested my code with all requirements for running the model
  • Done this analysis in the main branch of the repository
  • Checked that a similar issue does not exist already
  • If needed, asked first in the Gitter chat room about the issue

Fruitfly gppz gene doesn't exist

Description of the issue:

The 'gppz' gene included in the fruitfly GEM doesn't exist at FlyBase.
https://metabolicatlas.org/explore/Fruitfly-GEM/gem-browser/gene/gppz

Expected feature/value/output:

I don't know where 'gppz' originated from, but it's annotated in Fruitfly1 as a methyltransferase so I'm guessing it might be a typo for the 'gpp' gene? (http://flybase.org/reports/FBgn0264495.htm) (https://metabolicatlas.org/explore/Fruitfly-GEM/gem-browser/gene/gpp)

I hereby confirm that I have:

  • [x ] Checked that a similar issue does not exist already

Errors in the metaData for the release 1.2.0

Description of the issue:

There are some errors in the metaData of the release 1.2.0

  1. The version number is not defined in the release v1.2.0, which are defined in other releases.
  2. The short_name should be Fruitfly-GEM, but FruitflyGEM is used

Expected feature/value/output:

  1. The value of the version should be set as the version of this release, i.e. 1.2.0
  2. The short_name is set to Fruitfly-GEM

I hereby confirm that I have:

  • Done this analysis in the tag v1.2.0
  • Checked that a similar issue does not exist already

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.