Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

A sampling algorithm for convex and non-convex metabolic models

Project description

  • GapSplit is a sampling algorithm designed to generate uniform, high-coverage sample points on any metabolic model
  • regardless of convexity (i.e. logical/integer constraints).


sample(fname, n_points, lower_bounds=None, upper_bounds=None, n_update=100, n_secondary=0)
  • Generate samples from a given input model.
  • fname - str
    • String representing path to model file (see for acceptable file types).
  • n_points - int
    • Number of desired sample points.
  • lower_bounds - list/ndarray, optional
    • FVA minimums for model. Generated if not provided.
  • upper_bounds - list/ndarray, optional
    • FVA maximums for model. Generated if not provided.
  • n_update - int, optional
    • Refresh rate (in points) for console output of current model coverage and sample count.
  • n_secondary - int, optional
    • Number of additional gaps targeted for splitting.
  • samples - ndarray
    • n_points by n_reactions array of sample points.


  • gurobipy: 7.0 and up (requires download and license from - license provided free for academic users)
  • numpy: 1.14.5

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for gapsplit, version 1.1.1
Filename, size File type Python version Upload date Hashes
Filename, size gapsplit-1.1.1-py2-none-any.whl (1.7 kB) File type Wheel Python version py2 Upload date Hashes View hashes
Filename, size gapsplit-1.1.1.tar.gz (1.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page