/metaxime

Collection of projects for the analysis of metabolic pathways in cellular metabolisms

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

MetaXime

This project parses a TSV file that describes pathways and converts it to SBML. Then you have different analysis methods, such as thermodynamics, FBA and other analysis.

Introduction

Predict heterologous metabolic pathways to produce a compound of interest in a strain of interest.

The following SBML models are supported:

This project is a concatenation of different projects that may be found at the following here:

  • RetroRules: Generate a collection of reaction rules that are used by RetroPath2
  • RetroPath2: Given a target and a collection of sinks, predict the possible chemical routes between the two.
  • rp2Paths: From the metabolic network generated by RetroPath2, separate the individual metabolic routes between one or more sinks and the target molecule.
  • rpBase: Project that contains the base project to manipulate the enriched version of SBML files developed here. This project is the base project on which the others are based on.
  • rpCache: Generate the data lake of molecules and reactions to enrich SBML files.
  • rpReader: Parse the output of RetroPath2 and convert to SBML files
  • rpCofactors: From the mono-component reactions generated by RetroPath2, try to add the missing cofactors
  • rpThermo: Calculate the thermodynamics of predicted reactions and pathways. Based on the equilibrator project.
  • rpMergeSBML: Merge two SBML files together. Required step to calculate the FBA of a predicted pathway from RetroPath2 and its host organism
  • rpFBA: Calculate the FBA of the target chemical using the cobrapy package.
  • rpSenlenzyme: Return enzyme candidates for all predicted reactions. Based on the following project.

These individual projects are chained together in a galaxy interface implemented here.

Note: Development of the tools has now switched to the following repository.

How to run

To predict metabolic pathways, click on "Run Job" on the top banner.

Run Job

There you will need to provide the molecule that you would like to produce, the organism in which you would like to produce the molecule of interest, and the maximum number of reactions that the pathways may have.

Search SMILES Draw

The results may be inspected once the job is completed. The following error

Build

To build the project, navigate to the project folder and run the following commands:

docker build -t metaxime:skinny -f Dockerfile .

Structure

This project may be separated into three different parts, the retrosynthesis part to predict new pathways, the pathway analysis and the front end of the project

RetroSynthesis

These include RetroPath2, rp2paths and RetroRules. (TODO: finish separating that part into its own docker and API service: https://github.com/Melclic/retrosynthesis).

RetroPath2 is a KNIME workflow and requires the installation of the workflow execution environment to enable its execution. Rp2paths is a python package and RetroRules is a database of reaction rules. The script in this project parses database and extracts only information that is to be used in a particular execution (see reaction rule diameters. More info here).

Pathway Analysis

The pathway analysis part of the project may be found under the metaxime/ folder and is the central part of this project. It contains all the scripts that parse the output of RetroPath2 and rp2paths and turn them into SBML metabolic model files. This project supports the MIRIAM standard for SBML files, that contains the annotations for species, reactions and pathways to link these properties of a metabolic model to various databases.

We call "rpSBML" SBML files that are enriched to contain extra information related to the heterologous pathway. This includes the thermodynamic properties of the chemical species, reaction and pathways. It also holds the FBA run information and any extra annotation related to chemoinformatics properties of the predicted reactions.

Enriched Annotation

More detail on each of these files may be found in the various github projects described in the top of this README.

Front End and Architecture

The architecture of the project as follows:

Structure

The output of a run is a compressed file named rpcollection.tar.xz. This contains the enriched SBML models, the model JSON's and the model networks used to graphically render them on the front end.

├── log.json
├── model_json
│   └── rp_*_rpsbml.json
├── models
│   └─── rp_*_rpsbml.xml
└── networks
    └── rp_*_rpsbml.json

The web interface (in the static/ folder) contains all the JS and HTML. The draw_network.js renders the network JSON of the parsed SBML by networkX and renders it on the page using the dagre-d3 project.

Rendering the molecules in javascript is done by a branched project called smilesDrawer.