Skip to content

Commit

Permalink
Reorganize repository structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Paulocracy committed Nov 10, 2020
1 parent 9431228 commit 400f664
Show file tree
Hide file tree
Showing 159 changed files with 807 additions and 500 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ for an example of the Model Calibrator's kcat optimization method usage.
NOTE: You have to change the paths to the iJO1366*C model (see Supplementary File 1) to its location on your
system in order to rerun "kcat_optimization_run_fmincon_ec_model_2019_06_25.m".

MATLAB scripts starting with "p_" are considered "private" scripts which are not intended for a direct
MATLAB scripts starting with "p_" are considered "private" scripts which are not intended for direct
usage by the user and are therefore not documented in the manual.
55 changes: 26 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,67 +6,64 @@
## General Description

AutoPACMEN allows one to apply the sMOMENT method of automatically expanding a stoichiometric metabolic
model with protein allocation constraints ([Bekiaris & Klamt, 2020](#autopacmens-publication)).
AutoPACMEN consists of 2 parts:
1) A Python 3 Model Generator which primarily uses [cobrapy](https://github.com/opencobra/cobrapy) and which applies the sMOMENT
method on a stoichiometric metabolic model.
2) An optional mixed Python 3/MATLAB Model Calibrator whose MATLAB parts primarily use [CellNetAnalyzer](https://www2.mpi-magdeburg.mpg.de/projects/cna/cna.html)
and which allows one to optimize given protein allocation constraints in order to get a better fit
with <i>in vivo</i> data.
model with protein allocation constraints (as described in further detail in [Bekiaris & Klamt, 2020](#autopacmens-publication)).

This repository of AutoPACMEN consists of three source code parts:

1) The AutoPACMEN Model Generator, implemented as the Python module "autopacmen-Paulocracy" module, which provides a mostly automated way to generate enzyme-constraint-enhanced stoichiometric metabolic models, including an automatic retrieval of k<sub>cat</sub> values. It is primarily dependent on [cobrapy](https://github.com/opencobra/cobrapy).
<br>→This module can be found in the "autopacmen" subfolder.

2) An optional mixed Python 3/MATLAB AutoPACMEN Model Calibrator whose MATLAB parts primarily use [CellNetAnalyzer](https://www2.mpi-magdeburg.mpg.de/projects/cna/cna.html) and which allows one to optimize given protein allocation constraints in order to get a better fit with <i>in vivo</i> data.
<br>→The Python parts can be found in the "autopacmen" subfolder as described in AutoPACMEN's manual,the MATLAB parts can be found in the subfolder "AutoPACMEN_Model_Calibrator_MATLAB".

3) The exemplary usage of autopacmen-Paulocracy and the Model Calibrator resulting in the enzyme-constraint-enhanced model iJO1366*, as described in Supplementary File 1 of AutoPACMEN's publication. The final iJO1366* model is stored in a ready-to-use SBML form as "./iJO1366star/ec_model_2019_06_25_output_optimization/iJO1366star.xml".
<br>→The relevant scripts and data can be found in the "iJO1366" subfolder. <b>Note:</b> As it has a huge file size, the obligatory downloaded complete BRENDA text file brenda_downloads.txt (as described in AutoPACMEN's manual) is not included here. Instead, it can be downloaded from BRENDA's web site.

## Documentation

AutoPACMEN's manual can be found as "manual.pdf" or "manual.odt" in the "docs" subfolder of the "autopacmen" folder.
The combined manual for autopacmen-Paulocracy and the Model Calibrator can be found as "manual.pdf" or LibreOffice-compatible "manual.odt" in the "docs" subfolder folder.
It explains the manual installation process (without pip, see next chapter for the installation with pip) and usage of AutoPACMEN in detail.

An HTML documentation of the source code of AutoPACMEN's Python modules can be found under the main folder's subfolder "html".
An additional HTML documentation of the source code of AutoPACMEN's Python modules can be found under the "autopacmen" folder's subfolder "html".
This HTML documentation was automatically generated using [pdoc3](https://pdoc3.github.io/pdoc/) (link accessed on Oct 30, 2019).
The HTML documentation's starting point is "index.html" in the "./html/autopacmen" subfolder.

All scripts starting with "ec_model_2019_06_25" show the exemplary usage of AutoPACMEN for the generation of iJO1366*. All these scripts are intended to be run from the "autopacmen" subfolder of this repository. AutoPACMEN's exemplary usage is explained in AutoPACMEN's publication Supplementary File 1.

<b>Note:</b> As it has a huge file size, the downloaded complete BRENDA text file brenda_downloads.txt (as described in
AutoPACMEN's manual) is not included here.
The HTML documentation's starting point is "index.html" in the "./autopacmen/html/autopacmen" subfolder.

If you are particularily interested in the generation of k<sub>cat</sub> databases from BRENDA and SABIO-RK, look up
the scripts "data_parse_brenda_textfile.py", "data_parse_sabio_rk_for_model.py" as well as the combining
script "data_create_combined_kcat_database.py". These scripts create JSON files with the k<sub>cat</sub> data from these
databases with EC number, organism and substrate information. An exemplary created database with BRENDA is
"kcat_database_brenda" in the main folder's subfolder "ec_model_2019_06_25_output", a database with SABIO-RK is
"kcat_database_brenda" in the main folder's subfolder "./iJO1366star/ec_model_2019_06_25_output", a database with SABIO-RK is
"kcat_database_sabio_rk" in the same subfolder.

AutoPACMEN requires Python >=3.7 for its Python parts, and MATLAB >=2017a for its optional Model Calibrator
MATLAB scripts.

## Installation of autopacmen-Paulocracy using pip


## Installation of Python parts using pip

You can install the Python parts of AutoPACMEN's latest release [from PyPI](https://pypi.org/project/autopacmen-Paulocracy/) using pip as follows:
You can install autopacmen-Paulocracy [from PyPI](https://pypi.org/project/autopacmen-Paulocracy/) using pip as follows:
<pre>
pip install autopacmen-Paulocracy
</pre>

autopacmen-Paulocracy requires Python >=3.7 for its Python parts, and MATLAB >=2017a for its optional Model Calibrator
MATLAB scripts.


## Structure of AutoPACMEN's source code

<b>All relevant scripts are in the "autopacmen" main folder.</b>
All relevant scripts of autopacmen-Paulocracy are in the "autopacmen" main folder.

In this main folder, the scripts which start with "analysis_", "data_" and "modeling_" are command-line interfaces (CLI)
for AutoPACMEN's Python modules. These Python modules can be found the main folder's "submodules" subfolder.

The main folder's subfolder "AutoPACMEN_Model_Calibrator_MATLAB" contains the Model Calibrator's MATLAB parts.
The subfolder "AutoPACMEN_Model_Calibrator_MATLAB" contains the Model Calibrator's MATLAB parts.

All scripts and folders starting with "ec_model_2019_06_25" are part of the generation and analysis of iJO1366* (see AutoPACMEN's publication for more on it). From these scripts, these ones
starting with "ec_model_2019_06_25_figure" create either a full figure or data for a figure used in AutoPACMEN's publication.
All scripts and folders within "iJO1366star" are part of the generation and analysis of iJO1366* (see AutoPACMEN's publication for more about it). From these scripts, these ones
starting with "./iJO1366star/ec_model_2019_06_25_figure" create either a full figure or data for a figure used in AutoPACMEN's publication.

The main script for the generation of the uncalibrated iJO1366* model is "ec_model_2019_06_25_sMOMENT_iJO_CREATION.py" in the main folder. This
The main script for the generation of the uncalibrated iJO1366* model is "./iJO1366star/ec_model_2019_06_25_sMOMENT_iJO_CREATION.py" in the "iJO1366" subfolder. This
main script uses AutoPACMEN's functionalities as Python modules. The commented steps in this script correspond to the steps described in supplementary
File 1 of (Bekiaris & Klamt, in submission).


The main folder's subfolder "iJOstar_MCS_analysis_scripts" contains the scripts used for the computation and the analysis of the published Minimal Cut Set enumeration
The "iJO1366star" folder's subfolder "iJOstar_MCS_analysis_scripts" contains the scripts used for the computation and the analysis of the published Minimal Cut Set enumeration
with iJO1366 and iJO1366*.

AutoPACMEN creates a cache of SABIO-RK, NCBI TAXONOMY and UniProt data in the "_cache" main folder's subfolder. In the current state, the cache is the one
Expand Down
Binary file removed autopacmen/docs/manual.odt
Binary file not shown.
Binary file removed autopacmen/docs/manual.pdf
Binary file not shown.
97 changes: 0 additions & 97 deletions autopacmen/ec_model_2019_06_25_sMOMENT_iJO_CREATION.py

This file was deleted.

11 changes: 7 additions & 4 deletions autopacmen/html/autopacmen/analysis_fva_comparison.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,21 @@ <h1 class="title">Module <code>autopacmen.analysis_fva_comparison</code></h1>
# External module for command-line interfaces
import click
# Internal module, contains the actual FBA comparison function
from submodules.fva_comparison import fva_comparison_with_sbml
from .submodules.fva_comparison import fva_comparison_with_sbml


# Set-up command-line parameters using click decorators
@click.command()
@click.option(&#34;--sbml_original_path&#34;,
required=True,
type=click.Path(exists=True, file_okay=True, dir_okay=True, readable=True),
type=click.Path(exists=True, file_okay=True,
dir_okay=True, readable=True),
prompt=&#34;Original SBML path&#34;,
help=&#34;Full SBML path of original model without protein allocation constraints&#34;)
@click.option(&#34;--sbml_protein_constrained_path&#34;,
required=True,
type=click.Path(exists=True, file_okay=True, dir_okay=True, readable=True),
type=click.Path(exists=True, file_okay=True,
dir_okay=True, readable=True),
prompt=&#34;SBML path of sMOMENT-enhanced model&#34;,
help=&#34;Full SBML path of sMOMENT-enhanced model.&#34;)
@click.option(&#34;--objective&#34;,
Expand All @@ -86,7 +88,8 @@ <h1 class="title">Module <code>autopacmen.analysis_fva_comparison</code></h1>
Example: Print a comparative FVA for the non-constrained model &#39;C:\\original.xml&#39; and the sMOMENT-model &#39;C:\\pac.xml&#39; and the objective &#39;ACALD&#39;:
python analysis_fva_comparison.py --sbml_original_path C:\\original.xml --sbml_protein_constrained_path C:\\pac.xml --objective ACALD
&#34;&#34;&#34;
fva_comparison_with_sbml(sbml_original_path, sbml_protein_constrained_path, objective)
fva_comparison_with_sbml(
sbml_original_path, sbml_protein_constrained_path, objective)


# Start-up routine if script is called
Expand Down
2 changes: 1 addition & 1 deletion autopacmen/html/autopacmen/analysis_fva_prot_pool.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ <h1 class="title">Module <code>autopacmen.analysis_fva_prot_pool</code></h1>
import click
from typing import List
# Internal modules
from submodules.fva_prot_pool import fva_prot_pool_with_sbml
from .submodules.fva_prot_pool import fva_prot_pool_with_sbml


# Set-up command-line parameters using click decorators
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h1 class="title">Module <code>autopacmen.data_create_combined_kcat_database</co
# External modules
import click
# Internal modules
from submodules.create_combined_kcat_database import create_combined_kcat_database
from .submodules.create_combined_kcat_database import create_combined_kcat_database


# Set-up command-line parameters using click decorators
Expand All @@ -68,7 +68,7 @@ <h1 class="title">Module <code>autopacmen.data_create_combined_kcat_database</co
@click.option(&#34;--output_path&#34;,
required=True,
type=click.Path(exists=True, file_okay=True, dir_okay=True),
prompt=&#34;BRENDA JSON path&#34;,
prompt=&#34;Output path&#34;,
help=&#34;Full path to the newly created combined JSON&#34;)
def parse_create_combined_kcat_database(sabio_rk_kcat_database_path: str, brenda_kcat_database_path: str, output_path: str) -&gt; None:
&#34;&#34;&#34;Combines the BRENDA and SABIO-RK JSONs into one big JSON which can be used by modeling_get_reactions_kcat_mapping.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h1 class="title">Module <code>autopacmen.data_parse_bigg_metabolites_file</code
# External modules
import click
# Internal modules
from submodules.parse_bigg_metabolites_file import parse_bigg_metabolites_file
from .submodules.parse_bigg_metabolites_file import parse_bigg_metabolites_file


# Set-up command-line parameters using click decorators
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,21 @@ <h1 class="title">Module <code>autopacmen.data_parse_brenda_json_for_model</code
# External modules
import click
# Internal modules
from submodules.parse_brenda_json_for_model import parse_brenda_json_for_model
from .submodules.parse_brenda_json_for_model import parse_brenda_json_for_model


# Set-up command-line parameters using click decorators
@click.command()
@click.option(&#34;--sbml_path&#34;,
required=True,
type=click.Path(exists=True, file_okay=True, dir_okay=True, readable=True),
type=click.Path(exists=True, file_okay=True,
dir_okay=True, readable=True),
prompt=&#34;Path to SBML model&#34;,
help=&#34;Full path to the SBML with the model of which the BRENDA JSON will be derived.&#34;)
@click.option(&#34;--brenda_json_path&#34;,
required=True,
type=click.Path(exists=True, file_okay=True, dir_okay=True, readable=True),
type=click.Path(exists=True, file_okay=True,
dir_okay=True, readable=True),
prompt=&#34;BRENDA JSON path&#34;,
help=&#34;Full path to the BRENDA JSON created with data_parse_brenda_textfile.py&#34;)
@click.option(&#34;--json_output_path&#34;,
Expand Down
Loading

0 comments on commit 400f664

Please sign in to comment.