autocatatalyticsubnetworks

Computation of autocatalytic subnetworks

https://github.com/vblancoor/autocatatalyticsubnetworks

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: springer.com
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.8%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Computation of autocatalytic subnetworks

Basic Info
  • Host: GitHub
  • Owner: vblancoOR
  • Language: Jupyter Notebook
  • Default Branch: main
  • Size: 1.09 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Created almost 3 years ago · Last pushed over 1 year ago
Metadata Files
Readme Citation

README.md

Polyhedral geometry and combinatorics of an autocatalytic ecosystem

Python Codes for the Generation of Minimal Autocatalytic Subnetworks

Algorithm developed in:

Gagrani, P., Blanco, V., Smith, E., & Baum, D. (2024). Polyhedral geometry and combinatorics of an autocatalytic ecosystem. Journal of Mathematical Chemistry, 62(5), 1012-1078. https://link.springer.com/article/10.1007/s10910-024-01576-x


File autocatalyticcoreslib contains all the functions for the computation of minimal autocatalytic subnetworks from a given stoichiometric matrix.

Requirements:

  • pandas: to export results to excel files and handle data frames
  • numpy: to manipulate matrices
  • gurobipy: for solving the optimization problems (it can be downloaded and installed from www.gurobi.com)

Functions:

  • OptModelAutocatalyticCores(SM)_: Given the stoichiometric matrix SM computes the gurobi Integer Programming model to iterate in the construction of all the minimal autocatalytic subnetworks. The matrix SM is given such that its rows represent species and columns represent reactions.
  • ComputeAutocatalyticCores(SM, Excelfile: str, txtfile="", namesSp=[], namesRe=[], NumReact=0): Compute the entire list of minimal-support autocatalytic subnetworks. The stoichiometric matrix SM is given. The MAS are stored in an excel file "Excelfile" and optionally in a txt file. The names of the species and reactions can be optionally provided (otherwise the species are named C1, ...Cn, and the reactions R1, ... Rm). The function outputs a pandas dataframe with all the information about the cycles, namely:
    • AC (the label of the autocatalytic core, numbered) numReact (number of reactions)
    • F1, ... Fn (taking value 1 if species n is food species for the core, and 0 otherwise).
    • M1, ... Mn (taking value 1 if species n is core species for the core, and 0 otherwise).
    • W1, ... Wn (taking value 1 if species n is waste species for the core, and 0 otherwise).
    • EM1, ... EMn (taking value 1 if species n is a member non core species for the core, and 0 otherwise).
    • X1, ..., Xm: a feasible flux for the core (SM*X_i > 0 for core species)
    • Zeros: Number of zeros in the core-restricted stoichiometric matrix (helpful to determine the type of the core).

Datasets:

In folder "data" we provide different files with stochiometric matrices for CCRN with 1-constituent (for L=4, ..., 7) called "ccrn4.txt", "ccrn5.txt", "ccrn6.txt", and "ccrn7.txt".

Usage (example available in the Jupyter notebook autocatalyticsubnetworksexample

Load the library

from autocatalyticcoreslib import

Load the dataset of 1-constituent CCRN with 4 species (files for more species are available in data folder)

SM=np.loadtxt("data/binarycrn_n4.txt", dtype='i', delimiter=' ')

Compute minimal autocatalytic Subnetworks for that network

df = ComputeAutocatalyticCores(SM, "AC_n4.xlsx")

Owner

  • Login: vblancoOR
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.0.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Blanco"
  given-names: "Victor"
  orcid: "https://orcid.org/0000-0002-7762-6461"
- family-names: "Gagrani"
  given-names: "Praful"
  orcid: "https://orcid.org/0000-0001-7681-042X"
title: "Python Codes for the Generation of Minimal Autocatalytic Subnetworks"
version: 1.0.0
date-released: 2023-02-08
url: "https://github.com/github/autocatatalyticsubnetworks"

GitHub Events

Total
  • Fork event: 1
Last Year
  • Fork event: 1