Skip to main content

diel_models:

Project description

Diel Models

Compatibility

diel_models is compatible with the following versions of Python:

Python 3.8
Python 3.9
Python 3.10
Python 3.11
Python 3.12

Description

diel_models is a python package generated from this project and has its own ReadtheDocs file.

Despite numerous successful studies, modeling plant metabolism remains challenging for several reasons, such as limited information, incomplete annotations, and dynamic changes in plant metabolism that occur under different conditions, including night and day. In particular, the integration of these day-night cycles (diel cycles) is complex, laborious, and time-consuming.

With this in mind, this package aims to accelerate this process by being able to transform a non-diel model into a diel model.

Table of contents:

Installation

Pip

pip install diel_models==1.1.2

Getting Started

Using this package, you can handle generic or multi-tissue models by:

  • Assigning day and night;
  • Inserting specified metabolites into the storage pool allowing their transition between day and night, and vice versa;
  • Supressing the photon reaction flux at night;
  • Setting the flux of the nitrate reactions to 3:2 according to the literature;
  • (optional) Taking the day and night biomass reactions and creating a total biomass reaction resulting from the junctions of both. Supressing at the same time the flow of the individual reactions to zero and setting the total biomass reaction as the objective function.

If each method is to be applied individually it is essential that the first 3 steps are applied in that order specifically.

Alternatively, it is possible to apply all methods to a given model, running the entire pipeline (where the arguments are all relative to the original model), as shown below:

  • Generic model:
import cobra
from diel_models.diel_models_creator import diel_models_creator

model = cobra.io.read_sbml_model('.../.../desired_single_tissue_model.xml')

storage_pool_metabolites = ['Metabolite_ID_1', 'Metabolite_ID_2', 'Metabolite_ID_3']

diel_models_creator(model, storage_pool_metabolites, ['Photon_Reaction_ID'], ['Nitrate_Reaction_ID'], 'Biomass_Reaction_ID')
  • Multi-tissue model:
import cobra
from diel_models.diel_models_creator import diel_models_creator

model = cobra.io.read_sbml_model('.../.../desired_multi_tissue_model.xml')

storage_pool_metabolites = ['Metabolite_ID_1', 'Metabolite_ID_2', 'Metabolite_ID_3']

tissues = ['Tissue_ID_1', 'Tissue_ID_2']

diel_models_creator(model, storage_pool_metabolites, ['Photon_Reaction_ID'], ['Nitrate_Reaction_ID'], 'Biomass_Reaction_ID', tissues)

This is possible due to the created Pipeline class that derives from a Step class with abstract methods - both present in this package, in the pipeline.py file.

Expanding the pipeline

It is possible to add other classes to the diel_models_creator function, if desired, for example to create a different adjustment that needs to be taken into account in the diel models. To expand the pipeline, it is necessary to create a new class that inherits from the Step class and implement the abstract methods.

Considering a new hypothetical file new_class.py, this new class, in addition to the desired methods, would have to contain the two abstract methods of the Step class, run and validate, which, respectively, runs all the methods of the class returning the model and performs asserts to validate whether the class has been implemented successfully (or simply doesn't apply any if it doesn't make sense).

from diel_models.pipeline import Step

class NewClass(Step):

  def __init__(self, model, param1):
    self.model = model
    self.param1 = param1

  def method1(self):
    pass

  def method2(self):
    pass

  def run(self):
    self.method1()
    self.method2()

    return self.model

  def validate(self):
    pass

Then you need to adjust the diel_models_creator function to integrate the new class. This function is in the diel_models_creator.py file.

from typing import List

from cobra import Model

from diel_models.new_class import NewClass

from diel_models.pipeline import Pipeline

def diel_models_creator(model: Model, storage_pool_metabolites: List[str], photon_reaction_id: List[str],
                        nitrate_exchange_reaction: List[str], param1, biomass_reaction_id: str = None, tissues: List[str] = None) -> Model:  
  
    storage_pool_metabolites_with_day = [metabolite + "_Day" for metabolite in storage_pool_metabolites]
    photon_reaction_id_night = [photon_night_reaction + "_Night" for photon_night_reaction in photon_reaction_id]
    # ...
    
    steps = [
             # ...
            NewClass(model, param1)
        ]

    pipeline = Pipeline(model, steps)
    pipeline.run()
    return pipeline.model

Finally, you can run the diel_models_creator function with the new class.

Just as you can expand methods in the pipeline, you can modify or remove others.

Where to find the publication results

AraGEM:

  • Details about the fluxes in the AraGEM diel model reactions in the day and night phases, as well as in the original model where calculated in aragem_reactions_fluxes.py file.
  • Validation of the metabolites exchange reactions through simulation using pFBA where performed in simulation_sp.py file.
  • DFA file and respective Test file.
  • Plot from the pathway enrichment method representing the amount of differentially expressed reactions between day and night in each pathway.
  • PCA plot with the sampling values filtered by the differentially expressed reactions.

Quercus suber:

  • Details about the fluxes in the Quercus suber diel model reactions in the day and night phases, as well as in the original model where calculated in quercus_reactions_fluxes.py file.
  • Slight adjustments to the biomass reaction in the generated diel model can be found here.
  • Validation of the metabolites exchange reactions through simulation using pFBA where performed in simulation_sp_multi_quercus.py file.
  • The comparison between the flux of the biomass reaction for both diel multi-tissue models are in the quercus_diel_models_comparison.py file.

QY for the several models:

  • The scripts for quantum yield and assimilation quotient calculation for the Zea mays L. (2011), Arabidopsis thaliana (2010), Populus trichocarpa (2020), Solanum lycopersicum (2015), Solanum lycopersicum (2022) and Solanum tuberosum (2018) models can be found in the QY folder.

Project details


Download files

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

Source Distribution

diel_models-1.1.2.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

diel_models-1.1.2-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file diel_models-1.1.2.tar.gz.

File metadata

  • Download URL: diel_models-1.1.2.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for diel_models-1.1.2.tar.gz
Algorithm Hash digest
SHA256 2dd06048fa5fe4ce1ad39631fcfadc95fa29aa77e4443efa6bfbb170527e1b63
MD5 82d2074dd9705669a32fb075eea7f2ee
BLAKE2b-256 ec0d1efcf31692ca9cd60e98519e37539c73232a4d43469b2400c47dbd2f2d89

See more details on using hashes here.

File details

Details for the file diel_models-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: diel_models-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for diel_models-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c3878d7a731a9c275a479130e4f55e0150d8bf91cd4cc5b17974df381947b997
MD5 84091f738400413f1d2a5575d635dbd7
BLAKE2b-256 edb020ea93ac16f985e65af230646e9aad011f02c8602a8ccaaa31491ee15559

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page