diff --git a/docs/PAM_setup_guide.md b/docs/PAM_setup_guide.md index b65c41d..08a614c 100644 --- a/docs/PAM_setup_guide.md +++ b/docs/PAM_setup_guide.md @@ -1,5 +1,4 @@ - -# Protein Allocation Model (PAM) Setup Guide +# Setting up PAMs using PAModelpy This guide provides step-by-step instructions on how to use the provided Python scripts to build Protein Allocation Models (PAMs) from a genome-scale model and parameter datasets. @@ -152,5 +151,3 @@ eco_enzymes_mapped = merge_enzyme_complexes(enzyme_db, gene2protein) - **Issue: Objective value is zero after optimization** Solution: Check the input parameter file for consistency and ensure that all reactions are correctly annotated. - ---- diff --git a/docs/api.rst b/docs/api.rst deleted file mode 100644 index 3f50b01..0000000 --- a/docs/api.rst +++ /dev/null @@ -1,4 +0,0 @@ -.. autosummary:: - :toctree: generated - - src \ No newline at end of file diff --git a/docs/api_reference/Enzyme.md b/docs/api_reference/Enzyme.md index 918dd74..57acbca 100644 --- a/docs/api_reference/Enzyme.md +++ b/docs/api_reference/Enzyme.md @@ -1,10 +1,8 @@ ---- -sidebar_label: Enzyme -title: Enzyme ---- +# Enzyme classes Classes related to enzymes: - Enzyme: Constraints relating enzymes to reactions. Including upper and lower bound enzyme constraints +- EnzymeComplex: Constraints relating enzyme complexes to reactions. Including upper and lower bound enzyme constraints - EnzymeVariable: Variable related to an enzyme. The value of this variable represent the concentration. ## Enzyme Objects diff --git a/docs/api_reference/EnzymeSectors.md b/docs/api_reference/EnzymeSectors.md index 6348890..ed7d89c 100644 --- a/docs/api_reference/EnzymeSectors.md +++ b/docs/api_reference/EnzymeSectors.md @@ -1,7 +1,4 @@ ---- -sidebar_label: EnzymeSectors -title: EnzymeSectors ---- +# EnzymeSectors ## Sector Objects diff --git a/docs/api_reference/PAMValidator.md b/docs/api_reference/PAMValidator.md index a719ef7..f5cbfe4 100644 --- a/docs/api_reference/PAMValidator.md +++ b/docs/api_reference/PAMValidator.md @@ -1,7 +1,4 @@ ---- -sidebar_label: PAMValidator -title: PAMValidator ---- +# PAMValidator ## PAMValidator Objects diff --git a/docs/api_reference/PAModel.md b/docs/api_reference/PAModel.md index b06cd59..4f7047a 100644 --- a/docs/api_reference/PAModel.md +++ b/docs/api_reference/PAModel.md @@ -1,7 +1,4 @@ ---- -sidebar_label: PAModel -title: PAModel ---- +# PAModel ## PAModel Objects diff --git a/docs/api_reference/configuration.md b/docs/api_reference/configuration.md index e8c487e..c135b1d 100644 --- a/docs/api_reference/configuration.md +++ b/docs/api_reference/configuration.md @@ -1,7 +1,4 @@ ---- -sidebar_label: configuration -title: configuration ---- +# Configuration ## Config Objects diff --git a/docs/conf.py b/docs/conf.py index 6331342..16fed4e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -8,8 +8,8 @@ copyright = '2024, iAMB, RWTH Aachen University' author = 'Samira van den Bogaard' -release = '0.4.1' -version = '0.4.1' +release = '0.4.2' +version = '0.4.2' # -- General configuration diff --git a/docs/example.md b/docs/example.md index 9cf1d54..fe321a5 100644 --- a/docs/example.md +++ b/docs/example.md @@ -1,14 +1,6 @@ -from PAModelpy.Scripts.protein_costs_analysis import active_enzyme_infofrom PAModelpy.src import merge_enzyme_complexesfrom PAModelpy.Scripts.protein_costs_analysis import active_enzyme_infofrom PAModelpy.Scripts.protein_costs_analysis import active_enzyme_info--- -title: 'Examples' -sidebar_position: 2 -sidebar_title: 'Examples' ---- - # Example usage of PAModelpy -************* ## Example 1: setting up an *Escherichia coli* Protein Allocation model (PAM) -***** *Escherichia coli* (*E.coli*) is a commonly used model organism in Microbiology. When this microorganism is grown on increasing glucose concentration, it shifts from a purely respiratory metabolism to a respiro-fermentative metabolic phenotype. This phenomenon is called 'overflow metabolism'. Interestingly, overflow metabolism cannot be simulated using @@ -66,7 +58,7 @@ import os pam = set_up_pam(os.path.join('Data', 'proteinAllocationModel_iML1515_EnzymaticData_py_uniprot.xlsx'), os.path.join('Models', 'iML1515.xml')) ``` -More information can be found in the `PAM_setup_guide` +More information can be found in the :ref:`PAM_setup_guide` #### 1.1: Active enzyme sector The active enzyme sector will be build using information about which enzymes catalyzes a specific reaction, @@ -89,15 +81,20 @@ object. The main input in this object is the rxn2protein dictionary, where all t associations required to build the protein-reaction relations in the model. It has the following format: ```json -{'R1': - {'E1': - {'f': forward kcat, 'b': backward kcat, - 'molmass': molar mass, - 'protein_reaction_relation': [['E1']]}, - 'E2': - {'f': forward kcat, 'b': backward kcat, - 'molmass': molar mass, - 'protein_reaction_relation': [['E1']]} +{ + "R1": { + "E1": { + "f": "forward kcat", + "b": "backward kcat", + "molmass": "molar mass", + "protein_reaction_relation": [["E1"]] + }, + "E2": { + "f": "forward kcat", + "b": "backward kcat", + "molmass": "molar mass", + "protein_reaction_relation": [["E1"]] + } } } ``` @@ -106,7 +103,7 @@ peptides/proteins for one or more reactions), this information can be added in t of the reaction2protein dictionary. This entry is a list of lists, in which each sublist represent one functional enzyme (complex). This means if E1 and E2 catalyze the same reaction, the `protein_reaction_relation` becomes `[['E1','E2']]` for an enzyme complex ('AND' relation), and `[['E1']['E2']]` for isozymes ('OR' relation). In this example we will use -the peptide ids as defined by [UniProt](). The [paper introducting sEnz](https://doi.org/10.1093/bioinformatics/btae691) +the peptide ids as defined by [UniProt](https://www.uniprot.org/). The [paper introducting sEnz](https://doi.org/10.1093/bioinformatics/btae691) uses a different system, based on EC numbers. How to build those PAMs can be found in the scripts associated to the publication and in the `Script/pam_generation.py` file. Now we will use gene-protein-reaction relations obtained from a genome-scale model and uniprot to include different enzyme relations. @@ -228,7 +225,7 @@ the model, such as deleting or adding enzymes, changing kcats, changing enzymes at the following jupyter notebook: `Examples/PAModel_example_script.ipynb`. Have fun! ## Example 2: Determining the most sensitive enzymes in a toy model -****** + When looking at the flux distribution resulting from our simulations, we do not get any information about which enzymes played an important role in prediciting the specific metabolic phenotype. However, with the right model configurations, we get the sensitivity of the objective function to slight changes in the enzyme availability (enzyme sensitivity @@ -236,9 +233,7 @@ coefficients, ESC) as a result from the model simulations. In this example we'll sensitivities can help us explain concepts of protein allocation. -
- -![toy_model_image](assetsoy-model.png) +![toy_model_image](assets/toy-model.png)
**Figure 1. Toy model network and parameters** *This toy model represents a schematic overview of a microbial metabolism, @@ -380,7 +375,7 @@ print_heatmap(x_axis_esc, Cesc, yaxis=substrate_axis) ``` ### Step 4: Interpret the results -Compare the [toy model network structure](#toy_model_image) with the results from the heatmap. Did you expect these results? Do they make +Compare the toy model network structure :ref:`toy_model_image` with the results from the heatmap. Did you expect these results? Do they make sense? Which mechanisms to explain these observations. If the observations are not inline with you're expectations, you can use the enzyme sensitivities to point to the enzymatic parameters which might need to be adjusted (in this dummy example this makes no sense off course, but in reality this is a very plausible outcome). diff --git a/docs/index.rst b/docs/index.rst index 3a0e385..e8f56a6 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -4,11 +4,22 @@ Welcome to PAModelpy The PAModelpy package is designed to integrate protein constraints and protein sectors into protein allocation models (PAMs). In this documentation, you can find all the information you need to build and analyze PAMs. -Table of Contents -================== .. toctree:: - :glob: :maxdepth: 2 :caption: Table of Contents - *.md \ No newline at end of file + introduction.md + example.md + PAM_setup_guide.md + +.. toctree:: + :maxdepth: 1 + :caption: API reference + + api_reference/CatalyticEvent.md + api_reference/Constraints.md + api_reference/Enzyme.md + api_reference/EnzymeSectors.md + api_reference/PAMValidator.md + api_reference/PAModel.md + api_reference/configuration.md diff --git a/docs/introduction.md b/docs/introduction.md index f7c045a..34f5a23 100644 --- a/docs/introduction.md +++ b/docs/introduction.md @@ -1,12 +1,4 @@ ---- -title: 'Introduction' -sidebar_position: 1 -sidebar_title: 'Introduction' -slug: '/' ---- - # PAModelpy - Protein Allocation Model reconstruction in Python -******* ## What is PAModelpy? Models of metabolism are powerful tools to explore the metabolic potential of microorganism. diff --git a/src/PAModelpy/EnzymeSectors.py b/src/PAModelpy/EnzymeSectors.py index cdf86f1..c92dba7 100644 --- a/src/PAModelpy/EnzymeSectors.py +++ b/src/PAModelpy/EnzymeSectors.py @@ -160,6 +160,7 @@ def add(self, model): del rxn2protein[rxn_id] except: + print(model.reactions.query(rxn_id)) warn( f"Reaction {rxn_id} is not in the model, this reaction will be skipped" )