Skip to content

Commit

Permalink
Fixed bad bug with noise
Browse files Browse the repository at this point in the history
  • Loading branch information
cdiener committed Jun 11, 2016
2 parents b364034 + c3832cd commit d397543
Show file tree
Hide file tree
Showing 10 changed files with 734 additions and 158 deletions.
74 changes: 71 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,79 @@
[![codecov.io](https://codecov.io/github/cdiener/corda/coverage.svg?branch=master)](https://codecov.io/github/cdiener/corda?branch=master)
[![Code Health](https://landscape.io/github/cdiener/corda/master/landscape.svg?style=flat)](https://landscape.io/github/cdiener/corda/master)

# corda
# CORDA for Python

This is a Python implementation based on the paper of Schultz et. al.

[Reconstruction of Tissue-Specific Metabolic Networks Using CORDA](http://journals.plos.org/ploscompbiol/article/authors?id=10.1371%2Fjournal.pcbi.1004808)

We will try to employ a method similar to FastFVA to recycle the solvers which
should speed up the calculation a bit.
## What does it do?

CORDA, short for Cost Optimization Reaction Dependency Assessment is a method
for the reconstruction of metabolic networks from a given reference model
(a database of all known reactions) and a confidence mapping for reactions.
It allows you to reconstruct metabolic models for tissues, patients or specific
experimental conditions from a set of transcription or proteome measurements.

## How do I install it

CORDA for Python works only for Python 3.4+ and requires
[cobrapy](http://github.com/opencobra/cobrapy) to work. We recommend
installation via the [anaconda or miniconda](https://www.continuum.io/downloads)
distribution. After installing anaconda or miniconda you can install cobrapy
from the bioconda repository

```bash
conda install -c bioconda cobra
```
After that you can install CORDA using the pip from conda

```bash
pip install corda
```

To install the latest development version use

```bash
pip install https://github.com/cdiener/corda/archive/devel.zip
```

After CORDA for Python comes out of its infancy I will prepare a conda package
as well. For now the master branch is usually working and tested whereas all
new stuff is kept in the devel branch.

## What do I need to run it?

CORDA requires a base model including all reactions that could possibly included
such as Recon 1/2 or HMR. You will also need gene expression or proteome data
for our tissue/patient/experimental setting. This data has to be translated into
5 distinct classes: unknown (0), not expressed/present (-1), low confidence (1),
medium confidence (2) and high confidence (3). CORDA will then ensure to include
as many high confidence reactions as possible while minimizing the inclusion
of absent (-1) reactions while maintaining a set of metabolic requirements.

## How do I use it?

A small tutorial is found at https://cdiener.com/corda.

## What's the advantage over other reconstruction algorithms

I would say there are two major advantages:

1. It does not require any commercial solvers, in fact it works fastest with
the free glpk solver that already comes together with cobrapy. For instance
for the small central metabolism model (101 irreversible reactions) included
together with CORDA the reconstruction uses the following times:

- cglpk: 0.02 s
- cplex: 0.30 s
- gurobi: 0.12 s
- mosek: 0.23 s


2. It's fast. CORDA for Python uses a strategy similar to FastFVA, where a previous
solution basis is recycled repeatedly (speed-up of ~4-10 times). A normal
reconstruction for Recon 1 with mCADRE can take several hours. With the original
Matlab implementation of CORDA this takes about 40 minutes and with CORDA
for Python it takes less than 5 minutes. A Recon 2 reconstruction can be
achieved in less than 30 minutes.
6 changes: 3 additions & 3 deletions corda/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# __init__.py
#
#
# Copyright 2016 Christian Diener <mail[at]cdiener.com>
#
#
# MIT license. See LICENSE for more information.

from .util import reaction_confidence, safe_revert_reversible
from .util import reaction_confidence, test_model
from .corda import CORDA
Loading

0 comments on commit d397543

Please sign in to comment.