Commit bd7ac2ce authored by Peter Schubert's avatar Peter Schubert
Browse files

update fenced code part in README.md

parent dd4082eb
......@@ -11,14 +11,14 @@ This ia a porting of the respective MATLAB code, mainly the functions
CNAreduceMFNetwork, CNAcompressMFNetwork, to Python with following
enhancements:
- significant speedup (e.g. network reduction of genome-scale E. coli network
- significant speedup (network reduction of genome-scale E. coli network
30 h -> 1 h on a laptop)
- use of open software: Python, COBRApy, GNU glpk (CPLEX also supported)
- modifications can be implemented easier in Python compared to
MATLAB (fewer people program in MATLAB)
- direct interface to SBML coded models (import from SBML / export to SBML)
- due to COBRA integration, SBML identifiers, annotations,
gene-product-associations, genes and groups are taken over transparently
gene-product-associations, genes and groups taken over transparently
from original network to the reduced network, making integration
with external databases easier.
- protected reactions and metabolites can be configured using Python set or
......@@ -29,7 +29,7 @@ enhancements:
Speed-up improvements mainly du to faster implementation of flux variability
function calls on COBRApy. Additional speed improvements achieved by
continually removing reactions and blocked metabolites during the network
reduction process. Essential reactions are identified earlier.
reduction process. Essential reactions identified earlier.
Peter Schubert, Computational Cell Biology, HHU Duesseldorf, November 2021
......@@ -41,27 +41,26 @@ $ pip3 install networkred@git+https://gitlab.cs.uni-duesseldorf.de/schubert/net
## Small Python example
```python
>>> import networkred
>>>
>>> # file names
>>> original_sbml = 'sample_data/SBML_models/Deniz_model_fba.xml'
>>> reduced_sbml = 'sample_data/SBML_models/Deniz_model_fba_reduced.xml'
>>> protected_parts = 'sample_data/data/Deniz_model_fba_nrp.xlsx'
import networkred
# file names
original_sbml = 'sample_data/SBML_models/Deniz_model_fba.xml'
reduced_sbml = 'sample_data/SBML_models/Deniz_model_fba_reduced.xml'
protected_parts = 'sample_data/data/Deniz_model_fba_nrp.xlsx'
>>> # load the original model
>>> red_model = networkred.ReduceModel(original_sbml)
>>> # load and configure protected parts for network reduction
>>> nrp = networkred.load_raw_protected_data(protected_parts)
>>> red_model.set_reduction_params(protect_rids=nrp['reactions'],
protect_mids=nrp['metabolites'],
protect_funcs=nrp['functions'],
temp_fbc_bounds=nrp['bounds'])
>>> # reduce the network
>>> red_model.reduce()
>>>
>>> # export reduced model to sbml
>>> red_model.write_sbml(reduced_sbml)
# load the original model
red_model = networkred.ReduceModel(original_sbml)
# load and configure protected parts for network reduction
nrp = networkred.load_raw_protected_data(protected_parts)
red_model.set_reduction_params(protect_rids=nrp['reactions'],
protect_mids=nrp['metabolites'],
protect_funcs=nrp['functions'],
temp_fbc_bounds=nrp['bounds'])
# reduce the network
red_model.reduce()
# export reduced model to sbml
red_model.write_sbml(reduced_sbml)
```
......@@ -73,7 +72,6 @@ $ pip3 install networkred@git+https://gitlab.cs.uni-duesseldorf.de/schubert/net
Peter Schubert, October 2020
### References
[1]: Kamp A, Thiele S, Haedicke O, Klamt S. (2017) Use of CellNetAnalyzer
in biotechnology and metabolic engineering. Journal of Biotechnolgy 261: 221-228.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment