Skip to content

Commit

Permalink
Merge pull request #2 from SysBioChalmers/develop
Browse files Browse the repository at this point in the history
Fruitfly 1.0
  • Loading branch information
haowang-bioinfo authored Jan 17, 2021
2 parents 87db20f + 3f2401b commit 14c5b39
Show file tree
Hide file tree
Showing 8 changed files with 831,719 additions and 50 deletions.
20 changes: 10 additions & 10 deletions .standard-GEM.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@ Based on the ISO guidelines, tweaked for easy understanding.
### Instructions
This document serves as a checklist for creating an open source genome-scale metabolic model (GEM) on GitHub.

- [ ] 🟥 All GEMs that follow the `standard-GEM` must contain this file.
- [x] 🟥 All GEMs that follow the `standard-GEM` must contain this file.
This serves as a traceable adherence to the standard, manually confirmed by the original authors. This file must be edited only with [checkmarks](https://help.github.com/en/github/managing-your-work-on-github/about-task-lists), in order to support automatic parsing and validation of this file. Some of the checkmarks are pre-applied based on the contents of the `standard-GEM` template repository. GEM authors have the responsibility of checking that their model repository does follow the guidelines entirely.
With further updates to `standard-GEM`, one should paste over the new version of this file, and see that the changes in the new guidelines are met.

Repository creation
-------------------
- [ ] 🟨 Navigate to [standard-GEM](https://github.com/MetabolicAtlas/standard-GEM/) and click on the button `Use this template`
- [x] 🟨 Navigate to [standard-GEM](https://github.com/MetabolicAtlas/standard-GEM/) and click on the button `Use this template`
The `standard-GEM` template can be used to initiate a repository. This will copy the contents of the _master_ branch into the new repository, which can be either private or public.

- [ ] 🟥 Pick a repository name
- [x] 🟥 Pick a repository name
The name must be either a common name, KEGG organism, or taxonomy-derived short name, followed by the extension `-GEM` or `-GSMM`. The `-GEM` extension is preferred to ease pronunciation. The name can be prefixed by an abbreviation, eg `ec` (enzyme constrained), `sec` (with secretory pathways), `mito` (with mitochondrion pathways), `pro` (with protein structures).
Example: `ecYeast-GEM`

- [ ] 🟥 Pick a repository description
- [x] 🟥 Pick a repository description
The description must include the taxonomic classification in full.
Example: `The consensus GEM for Saccharomyces cerevisiae`

- [ ] 🟥 Add repository topic
- [x] 🟥 Add repository topic
The topic `standard-GEM` must be added. Other topics like `genome-scale-models`, `systems-biology` can be added. Having this topic on your repository enables automatic finding using the GitHub API, and automatic validation of the standard.
Topics are not copied from `standard-GEM`, so they need to be added manually.

Expand All @@ -42,13 +42,13 @@ The URL can be the link to the publication/pre-print/website where the model is

Repository workflow
-------------------
- [ ] 🟥 Git branches
- [x] 🟥 Git branches
The GEM repository must have at least two branches: _master_ and _develop_.

- [ ] 🟥 Releases
- [x] 🟥 Releases
Releases must use the tag format `X.X.X` where X are numbers, according to [semantic versioning principles](https://semver.org/). The last field, also called “patch”, can also be used to indicate changes to the repository that do not actually change the GEM itself. The use of a `v` before the version number (`v1.0`) [is discouraged](https://semver.org/#is-v123-a-semantic-version). For more information about releases see the [documentation at GitHub](https://docs.github.com/en/github/administering-a-repository/managing-releases-in-a-repository).

- [ ] 🟨 Commits
- [x] 🟨 Commits
Commit messages can follow the style of semantic commits.


Expand All @@ -72,7 +72,7 @@ The repository must contain a `/code` folder. This folder must contain all the c
- [ ] 🟥 `/data/README.md`
The repository must contain a `/data` folder. This folder contains the data used in generating the model. It must also include a `README.md` file that describes how the folder is organized.

- [ ] 🟥 `/model`
- [x] 🟥 `/model`
The repository must contain `/model` folder.
This folder must contain the model files, in multiple formats, according to the table below. As a general guideline, binary formats (`.mat`, `.xlsx`) must not exist on any other branches than _master_. The main reason for this is that binary files cannot be diff'ed, which means changes cannot be compared to previous versions, thus increasing the chance of errors. Moreover, with time, the size of the repository can create difficulties, and we cannot yet recommend storing these files with Git LFS, as it introducs complexity.
For more information on the `sbtab` file format, see [sbtab.net](https://sbtab.net).
Expand All @@ -93,7 +93,7 @@ Example: `yeast-GEM.mat`
- [x] 🟥 `/LICENSE.md`
The repository must contain a license file. The default license is [CC-BY 4.0 International](https://creativecommons.org/licenses/by/4.0/). Unless a different license is desired, the file does not require modification.

- [ ] 🟥 `/README.md`
- [x] 🟥 `/README.md`
The repository must contain a `README.md` file. A default file is provided, and the adequate contents must be filled in.
The `/README.md` file must include a version badge. A default is provided in the file.
Additionally, the `/README.md` file should contain the [Zenodo](https://zenodo.org) badge. As soon as the first public release is in made, the repository [should be archived via Zenodo](https://github.com/MetabolicAtlas/standard-GEM/wiki/FAQ#zenodo), and the corresponding badge be updated. A default is provided in the file.
Expand Down
91 changes: 51 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,69 +1,80 @@
> Introduction (please delete after reading):
[standard-GEM](https://github.com/MetabolicAtlas/standard-GEM) is a template repository that aims to standardize the format of genome-scale metabolic models (GEMs) versioned with git. In addition to encouraging the open-sourcing of GEMs, it facilitates the import of GEMs into databases and online websites. Moreover, it provides the community with a familiar structure that is easy to adopt through this repository itself. The template comes with a set of requirements and recommendations, packaged as to-do items in a hidden Markdown file in this repository `.standard-GEM.md`. After downloading this repository, or using it as a template, those to-do items provide guidance to how adherence to the standard can be obtained.

> Instructions for this `README` (please delete after reading):
This is the `README.md` template provided by [standard-GEM](https://github.com/MetabolicAtlas/standard-GEM) and was crafted to cover most use-cases.
Feel free to edit this template `README`. Blanks are indicated by `{{ test }}`. One may use a search function to find these `{{`. Here are some examples of blanks used throughout this file: `{{organization or username}}` is the organization name or username for this GitHub repository, eg. `SysBioChalmers`; `{{repository name}}` is the name of this GitHub repository, eg. `yeast-GEM`.
If you find this template does not fit your needs, we would appreciate if you could report this by creating a new issue on [standard-GEM](https://github.com/MetabolicAtlas/standard-GEM/issues).
# Fruitfly-GEM: The generic genome-scale metabolic model of _Drosophila melanogaster_


## {{repository name}}: {{repository description}}

[![Version](https://badge.fury.io/gh/{{organization or username}}%2F{{repository name}}.svg)](https://badge.fury.io/gh/sysbiochalmers/yeast-gem)
[![Zenodo](https://zenodo.org/badge/{{Zenodo ID}}.svg)](https://zenodo.org/badge/latestdoi/{{Zenodo ID}})
[![Gitter chat](https://badges.gitter.im/{{organization or username}}/{{repository name}}.svg)](https://gitter.im/{{organization or username}}/{{repository name}})
[![GitHub version](https://badge.fury.io/gh/sysbiochalmers%2FFruitfly-GEM.svg)](https://badge.fury.io/gh/sysbiochalmers%2FFruitfly-GEM)


#### Description

{{ fill in a short description or the paper abstract }}
This repository contains the latest version of Fruitfly-GEM, a fruit fly genome-scale metabolic model.


#### Citation

{{ provide the citation once available, for example:
> Lu, H., Li, F., Sánchez, B.J. et al (2019). A consensus S. cerevisiae metabolic model Yeast8 and its ecosystem for comprehensively probing cellular metabolism. Nat Commun 10, 3586 [doi:10.1038/s41467-019-11581-3](https://doi.org/10.1038/s41467-019-11581-3)
}}

Manuscript under preparation

#### Keywords

> Keywords are be separated by semicolons.
> The `Model source` field contains the source(s) of the current model, eg existing GEMs. If possible, use the Markdown format to add the URL with the DOI. The (NCBI) taxonomy ID should be provided in the [format from identifiers.org](https://registry.identifiers.org/registry/taxonomy). For the genome identifier, please provide the ENA/GenBank/RefSeq identifier via *identifiers.org*, or from other sources such as PATRIC or KBase.
#### Model Keywords

**Utilisation:** {{ experimental data reconstruction; multi-omics integrative analysis;, _in silico_ strain design; model template }}
**Field:** {{ metabolic-network reconstruction }}
**Type of model:** {{ reconstruction; curated }}
**Model source:** {{ [YeastMetabolicNetwork](http://doi.org/10.1038/nbt1492) }}
**Omic source:** {{ genomics; metabolomics }}
**Taxonomic name:** {{ _Saccharomyces cerevisiae_ }}
**Taxonomy ID:** {{ [taxonomy:559292](https://identifiers.org/taxonomy:559292) }}
**Genome ID:** {{ [insdc.gca:GCA_000146045.2](https://identifiers.org/insdc.gca:GCA_000146045.2) }}
**Metabolic system:** {{ general metabolism }}
**Utilisation:** multi-omics integrative analysis, predictive simulation
**Field:** metabolic-network reconstruction
**Type of Model:** reconstruction, curated
**Model source:** [Human-GEM](https://doi.org/10.1126/scisignal.aaz1482)
**Omic source:** genomics; metabolomics
**Taxonomic name:** _Drosophila melanogaster_
**Taxonomy ID:** [7227](https://identifiers.org/taxonomy:7227)
**Genome ID:** [GCA_000001215.4](https://identifiers.org/insdc.gca:GCA_000001215.4)
**Metabolic System:** general metabolism
**Tissue:**
**Bioreactor:**
**Cell type:**
**Cell line:**
**Strain:** {{ S288C }}
**Condition:** {{ aerobic; glucose-limited; defined media }}
**Condition:** generic metabolism


### Installation
### Model Overview

{{ Be mindful of users who do not have a typical background - provide a clear overview of the required software. Also, there might be different requirements for users and collaborators. }}
|Taxonomy | Template Model | Reactions | Metabolites| Genes |
| ------------- |:-------------:|:-------------:|:-------------:|:-----:|
|_Drosophila melanogaster_ | Human-GEM | 12072 | 8164 | 2048 |


### Usage
## Installation

{{ Describe how to load and save the model. }}
### Required Software
* A functional MATLAB installation (MATLAB 7.3 and higher).
* The [RAVEN toolbox](https://github.com/SysBioChalmers/RAVEN).
* The [COBRA toolbox](https://github.com/opencobra/cobratoolbox) (not necessary for most functionality).


### Contributing
### Dependencies - Recommended Software
* The libSBML MATLAB API (version [5.13.0](https://sourceforge.net/projects/sbml/files/libsbml/5.13.0/stable/MATLAB%20interface/) is recommended).
* [Gurobi Optimizer](http://www.gurobi.com/registration/download-reg) for any simulations.


### Installation Instructions
* Clone the [master branch](https://github.com/SysBioChalmers/Fruitfly-GEM/tree/master) of this repository, or [download the latest release](https://github.com/SysBioChalmers/Fruitfly-GEM/releases/latest).
* Add the directory to your MATLAB path (instructions [here](https://se.mathworks.com/help/matlab/ref/addpath.html?requestedDomain=www.mathworks.com)).


Contributions are always welcome! Please read the [contributing guideline](.github/CONTRIBUTING.md) to get started.
## Usage

#### Loading/saving the model

`Fruitfly-GEM.mat` (Recommended if on `master` branch)
* Load and save using the built-in MATLAB `load()` and `save()` functions.

`Fruitfly-GEM.xml` (SBML format)
* Load using the `importModel.m` function (from [RAVEN Toolbox](https://github.com/SysBioChalmers/RAVEN))
* Save using the `exportModel.m` function (from [RAVEN Toolbox](https://github.com/SysBioChalmers/RAVEN))


## Websites

- [Metabolic Atlas](https://metabolicatlas.org/) enables visualization and exploration of Fruitfly-GEM content.


### Contributing

### Contributors
Contributions are always welcome! Please read the [contributing guidelines](.github/CONTRIBUTING.md) to get started.

Code contributors are reported automatically by GitHub under [Contributors](https://github.com/{{organization or username}}/{{repository name}}/graphs/contributors), while other contributions come in as [Issues](https://github.com/{{organization or username}}/{{repository name}}/issues).
5 changes: 5 additions & 0 deletions code/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Fruitfly-GEM code

- `masterScriptFruitflyGEM.m`: The master script for GEM generation.


83 changes: 83 additions & 0 deletions code/masterScriptFruitflyGEM.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
%
% FILE NAME: masterScriptFruitflyGEM.m
%
%
% PURPOSE: This script is for reconstruction of the Fruitfly-GEM, by using
% the Human-GEM as template and taking into account specie-specific
% pathways/reactions.
%
%


%% Load Human-GEM as template
load('Human-GEM.mat');


% convert gene identifiers from Ensembl ids to gene symbols
[grRules,genes,rxnGeneMat] = translateGrRules(ihuman.grRules,'Name','ENSG');
ihuman.grRules = grRules;
ihuman.genes = genes;
ihuman.rxnGeneMat = rxnGeneMat;



%% Use MA reactions identifiers

% load reaction annotaiton files
rxnAssoc = jsondecode(fileread('humanGEMRxnAssoc.JSON'));

%replace reaction identifiers with MA ids if available
ind = getNonEmptyList(rxnAssoc.rxnMAID);
ihuman.rxns(ind) = rxnAssoc.rxnMAID(ind);



%% Generate Fruitfly-GEM by using Human-GEM as template

% get ortholog pairs from human to worm
fruitflyOrthologPairs = extractAllianceGenomeOrthologs('human2FruitflyOrthologs.json');
fruitflyGEM = getModelFromOrthology(ihuman, fruitflyOrthologPairs);



%% Incorporate species-specific reactions

% get metabolic networks based on the KEGG annoation using RAVEN function
KEGG_human=getKEGGModelForOrganism('hsa');
KEGG_fruitfly=getKEGGModelForOrganism('dme');

% remove reactions shared with human
FruitflySpecificRxns=setdiff(KEGG_fruitfly.rxns,KEGG_human.rxns);

% remove reactions included in Human-GEM
FruitflySpecificRxns=setdiff(FruitflySpecificRxns,rxnAssoc.rxnKEGGID);


% get species-specific network for manual inspection and then
% organize species-specific pathways into two tsv files:
fruitflySpecificNetwork=removeReactions(KEGG_fruitfly,...
setdiff(KEGG_fruitfly.rxns,FruitflySpecificRxns), true, true, true);

% "fruitflySpecificMets.tsv" contains species-specific metabolites
metsToAdd = importTsvFile('fruitflySpecificMets.tsv');

% "fruitflySpecificRxns.tsv" contains species-specific reactions
rxnsToAdd = importTsvFile('fruitflySpecificRxns.tsv');
rxnsToAdd.subSystems = cellfun(@(s) {{s}}, rxnsToAdd.subSystems);

% integrate fruitfly-specific metabolic network
[fruitflyGEM, modelChanges] = addMetabolicNetwork(fruitflyGEM, rxnsToAdd, metsToAdd);


%% Gap-filling for biomass formation
[fruitflyGEM, gapfillNetwork]=gapfill4EssentialTasks(fruitflyGEM,ihuman);
% Added 39 reactions for gap-filling


%% Save the model into mat, yml, and xml

fruitflyGEM.id = 'Fruitfly-GEM';
save('../model/Fruitfly-GEM.mat', 'fruitflyGEM');
writeHumanYaml(fruitflyGEM, '../model/Fruitfly-GEM.mat');
exportModel(fruitflyGEM, '../model/Fruitfly-GEM.xml');

9 changes: 9 additions & 0 deletions data/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Fruitfly-GEM data

This directory contains datasets that were used for the generation and curation of Fruitfly-GEM. The files and their contents are briefly summarized below.


- `human2FruitflyOrthologs.json`: The human-fruit fly ortholog pairs downloaded from the [Alliance of Genomes Resources](https://www.alliancegenome.org).
- `fruitflySpecificMets.tsv` and `fruitflySpecificRxns.tsv`: The curated metabolic network that is not part of human metabolism but specific to fruit fly.


Loading

0 comments on commit 14c5b39

Please sign in to comment.