Giter Site home page Giter Site logo

pyfastcore's Introduction

pyfastcore

A python implementation of the context-specific model extraction method FastCore by Vlassis et al. (2014)

  • Vlassis, N., Pacheco, M. P., & Sauter, T. (2014). PLoS Computational Biology, 10(1) [Full Article]

INSTALATION

You can install pyfastcore using: python setup.py install

of via pip: pip install pyfastcore

USAGE EXAMPLE

from cobra.test import create_test_model
from pyfastcore import Fastcore

# Loading a toy model of E. coli from cobra.test package
model = create_test_model('textbook')
# Define the list of core reactions
core_reactions = ['Biomass_Ecoli_core', 'ATPM']
# Setting the penalty of exchange fluxes to 0
penalties = {}
for r in model.exchanges:
    penalties[r.id] = 0

# Creating a fastcore solver instnace
fc_builder = Fastcore(model, core_reactions,
                      penalties=penalties,
                      default_penalty=10,
                      debug_mode=True)

# Rnunning fastcore
fc_builder.fast_core()

# checking the list of reaction in the consistent network found
consistent_subnetwork = fc_builder.consistent_subnetwork
print("Consistent subnetworksize set size", len(consistent_subnetwork))
print("Context specific core:")
print(consistent_subnetwork)

# creating a cobra model for the consistent network found
print(f"Building context-specific model for {model.id}")
cs_model = fc_builder.build_context_specific_model()

# Running and FBA using subnetwork model 
print("Running FBA on CS-model")
sol = cs_model.optimize()
print(cs_model.summary())

Citation

If you use this package cite:

  • Ponce-De-Leon, M. et al. (2015) Consistency Analysis of Genome-Scale Models of Bacterial Metabolism: A Metamodel Approach. PloS one, 10, e0143626.

pyfastcore's People

Contributors

migp11 avatar

Stargazers

Costas Mexis avatar  avatar

Watchers

James Cloos avatar  avatar

Forkers

kirolos-raafat

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.