seed2lp 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of seed2lp might be problematic. Click here for more details.
- seed2lp-1.0.0/LICENCE.txt +145 -0
- seed2lp-1.0.0/MANIFEST.in +6 -0
- seed2lp-1.0.0/PKG-INFO +400 -0
- seed2lp-1.0.0/README.mkd +369 -0
- seed2lp-1.0.0/seed2lp/__init__.py +12 -0
- seed2lp-1.0.0/seed2lp/__main__.py +582 -0
- seed2lp-1.0.0/seed2lp/_version.py +2 -0
- seed2lp-1.0.0/seed2lp/argument.py +535 -0
- seed2lp-1.0.0/seed2lp/asp/enum-cc.lp +50 -0
- seed2lp-1.0.0/seed2lp/asp/flux.lp +67 -0
- seed2lp-1.0.0/seed2lp/asp/maximize_flux.lp +2 -0
- seed2lp-1.0.0/seed2lp/asp/maximize_produced_target.lp +7 -0
- seed2lp-1.0.0/seed2lp/asp/minimize.lp +8 -0
- seed2lp-1.0.0/seed2lp/asp/seed-solving.lp +174 -0
- seed2lp-1.0.0/seed2lp/clingo_lpx.py +235 -0
- seed2lp-1.0.0/seed2lp/color.py +34 -0
- seed2lp-1.0.0/seed2lp/config.yaml +26 -0
- seed2lp-1.0.0/seed2lp/description.py +497 -0
- seed2lp-1.0.0/seed2lp/file.py +151 -0
- seed2lp-1.0.0/seed2lp/flux.py +260 -0
- seed2lp-1.0.0/seed2lp/linear.py +429 -0
- seed2lp-1.0.0/seed2lp/log_conf.yaml +25 -0
- seed2lp-1.0.0/seed2lp/logger.py +116 -0
- seed2lp-1.0.0/seed2lp/metabolite.py +60 -0
- seed2lp-1.0.0/seed2lp/network.py +909 -0
- seed2lp-1.0.0/seed2lp/reaction.py +201 -0
- seed2lp-1.0.0/seed2lp/reasoning.py +825 -0
- seed2lp-1.0.0/seed2lp/resmod.py +68 -0
- seed2lp-1.0.0/seed2lp/sbml.py +246 -0
- seed2lp-1.0.0/seed2lp/scope.py +122 -0
- seed2lp-1.0.0/seed2lp/solver.py +301 -0
- seed2lp-1.0.0/seed2lp/utils.py +183 -0
- seed2lp-1.0.0/seed2lp.egg-info/PKG-INFO +400 -0
- seed2lp-1.0.0/seed2lp.egg-info/SOURCES.txt +40 -0
- seed2lp-1.0.0/seed2lp.egg-info/dependency_links.txt +1 -0
- seed2lp-1.0.0/seed2lp.egg-info/entry_points.txt +2 -0
- seed2lp-1.0.0/seed2lp.egg-info/not-zip-safe +1 -0
- seed2lp-1.0.0/seed2lp.egg-info/requires.txt +12 -0
- seed2lp-1.0.0/seed2lp.egg-info/top_level.txt +1 -0
- seed2lp-1.0.0/setup.cfg +55 -0
- seed2lp-1.0.0/setup.py +32 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
|
2
|
+
Version 3, 29 June 2007
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
|
5
|
+
|
|
6
|
+
Everyone is permitted to copy and distribute verbatim copies of this license
|
|
7
|
+
document, but changing it is not allowed.
|
|
8
|
+
|
|
9
|
+
This version of the GNU Lesser General Public License incorporates the terms and
|
|
10
|
+
conditions of version 3 of the GNU General Public License, supplemented by the
|
|
11
|
+
additional permissions listed below.
|
|
12
|
+
|
|
13
|
+
0. Additional Definitions.
|
|
14
|
+
|
|
15
|
+
As used herein, “this License” refers to version 3 of the GNU Lesser General
|
|
16
|
+
Public License, and the “GNU GPL” refers to version 3 of the GNU General Public
|
|
17
|
+
License.
|
|
18
|
+
|
|
19
|
+
“The Library” refers to a covered work governed by this License, other than an
|
|
20
|
+
Application or a Combined Work as defined below.
|
|
21
|
+
|
|
22
|
+
An “Application” is any work that makes use of an interface provided by the
|
|
23
|
+
Library, but which is not otherwise based on the Library. Defining a subclass of
|
|
24
|
+
a class defined by the Library is deemed a mode of using an interface provided
|
|
25
|
+
by the Library.
|
|
26
|
+
|
|
27
|
+
A “Combined Work” is a work produced by combining or linking an Application with
|
|
28
|
+
the Library. The particular version of the Library with which the Combined Work
|
|
29
|
+
was made is also called the “Linked Version”.
|
|
30
|
+
|
|
31
|
+
The “Minimal Corresponding Source” for a Combined Work means the Corresponding
|
|
32
|
+
Source for the Combined Work, excluding any source code for portions of the
|
|
33
|
+
Combined Work that, considered in isolation, are based on the Application, and
|
|
34
|
+
not on the Linked Version.
|
|
35
|
+
|
|
36
|
+
The “Corresponding Application Code” for a Combined Work means the object code
|
|
37
|
+
and/or source code for the Application, including any data and utility programs
|
|
38
|
+
needed for reproducing the Combined Work from the Application, but excluding the
|
|
39
|
+
System Libraries of the Combined Work.
|
|
40
|
+
|
|
41
|
+
1. Exception to Section 3 of the GNU GPL.
|
|
42
|
+
|
|
43
|
+
You may convey a covered work under sections 3 and 4 of this License without
|
|
44
|
+
being bound by section 3 of the GNU GPL.
|
|
45
|
+
|
|
46
|
+
2. Conveying Modified Versions.
|
|
47
|
+
|
|
48
|
+
If you modify a copy of the Library, and, in your modifications, a facility
|
|
49
|
+
refers to a function or data to be supplied by an Application that uses the
|
|
50
|
+
facility (other than as an argument passed when the facility is invoked), then
|
|
51
|
+
you may convey a copy of the modified version:
|
|
52
|
+
|
|
53
|
+
a) under this License, provided that you make a good faith effort to ensure
|
|
54
|
+
that, in the event an Application does not supply the function or data, the
|
|
55
|
+
facility still operates, and performs whatever part of its purpose remains
|
|
56
|
+
meaningful, or
|
|
57
|
+
b) under the GNU GPL, with none of the additional permissions of this License
|
|
58
|
+
applicable to that copy.
|
|
59
|
+
|
|
60
|
+
3. Object Code Incorporating Material from Library Header Files.
|
|
61
|
+
|
|
62
|
+
The object code form of an Application may incorporate material from a header
|
|
63
|
+
file that is part of the Library. You may convey such object code under terms of
|
|
64
|
+
your choice, provided that, if the incorporated material is not limited to
|
|
65
|
+
numerical parameters, data structure layouts and accessors, or small macros,
|
|
66
|
+
inline functions and templates (ten or fewer lines in length), you do both of
|
|
67
|
+
the following:
|
|
68
|
+
|
|
69
|
+
a) Give prominent notice with each copy of the object code that the Library
|
|
70
|
+
is used in it and that the Library and its use are covered by this License.
|
|
71
|
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
|
72
|
+
document.
|
|
73
|
+
|
|
74
|
+
4. Combined Works.
|
|
75
|
+
|
|
76
|
+
You may convey a Combined Work under terms of your choice that, taken together,
|
|
77
|
+
effectively do not restrict modification of the portions of the Library
|
|
78
|
+
contained in the Combined Work and reverse engineering for debugging such
|
|
79
|
+
modifications, if you also do each of the following:
|
|
80
|
+
|
|
81
|
+
a) Give prominent notice with each copy of the Combined Work that the
|
|
82
|
+
Library is used in it and that the Library and its use are covered by this
|
|
83
|
+
License.
|
|
84
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this
|
|
85
|
+
license document.
|
|
86
|
+
c) For a Combined Work that displays copyright notices during execution,
|
|
87
|
+
include the copyright notice for the Library among these notices, as well
|
|
88
|
+
as a reference directing the user to the copies of the GNU GPL and this
|
|
89
|
+
license document.
|
|
90
|
+
d) Do one of the following:
|
|
91
|
+
0) Convey the Minimal Corresponding Source under the terms of this
|
|
92
|
+
License, and the Corresponding Application Code in a form suitable for,
|
|
93
|
+
and under terms that permit, the user to recombine or relink the
|
|
94
|
+
Application with a modified version of the Linked Version to produce a
|
|
95
|
+
modified Combined Work, in the manner specified by section 6 of the GNU
|
|
96
|
+
GPL for conveying Corresponding Source.
|
|
97
|
+
1) Use a suitable shared library
|
|
98
|
+
mechanism for linking with the Library. A suitable mechanism is one that
|
|
99
|
+
(a) uses at run time a copy of the Library already present on the user's
|
|
100
|
+
computer system, and (b) will operate properly with a modified version
|
|
101
|
+
of the Library that is interface-compatible with the Linked Version.
|
|
102
|
+
e) Provide Installation Information, but only if you would otherwise be
|
|
103
|
+
required to provide such information under section 6 of the GNU GPL, and
|
|
104
|
+
only to the extent that such information is necessary to install and execute
|
|
105
|
+
a modified version of the Combined Work produced by recombining or relinking
|
|
106
|
+
the Application with a modified version of the Linked Version. (If you use
|
|
107
|
+
option 4d0, the Installation Information must accompany the Minimal
|
|
108
|
+
Corresponding Source and Corresponding Application Code. If you use option
|
|
109
|
+
4d1, you must provide the Installation Information in the manner specified
|
|
110
|
+
by section 6 of the GNU GPL for conveying Corresponding Source.)
|
|
111
|
+
|
|
112
|
+
5. Combined Libraries.
|
|
113
|
+
|
|
114
|
+
You may place library facilities that are a work based on the Library side by
|
|
115
|
+
side in a single library together with other library facilities that are not
|
|
116
|
+
Applications and are not covered by this License, and convey such a combined
|
|
117
|
+
library under terms of your choice, if you do both of the following:
|
|
118
|
+
|
|
119
|
+
a) Accompany the combined library with a copy of the same work based on the
|
|
120
|
+
Library, uncombined with any other library facilities, conveyed under the
|
|
121
|
+
terms of this License.
|
|
122
|
+
b) Give prominent notice with the combined library that part of it is a work
|
|
123
|
+
based on the Library, and explaining where to find the accompanying
|
|
124
|
+
uncombined form of the same work.
|
|
125
|
+
|
|
126
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
|
127
|
+
|
|
128
|
+
The Free Software Foundation may publish revised and/or new versions of the GNU
|
|
129
|
+
Lesser General Public License from time to time. Such new versions will be
|
|
130
|
+
similar in spirit to the present version, but may differ in detail to address
|
|
131
|
+
new problems or concerns.
|
|
132
|
+
|
|
133
|
+
Each version is given a distinguishing version number. If the Library as you
|
|
134
|
+
received it specifies that a certain numbered version of the GNU Lesser General
|
|
135
|
+
Public License “or any later version” applies to it, you have the option of
|
|
136
|
+
following the terms and conditions either of that published version or of any
|
|
137
|
+
later version published by the Free Software Foundation. If the Library as you
|
|
138
|
+
received it does not specify a version number of the GNU Lesser General Public
|
|
139
|
+
License, you may choose any version of the GNU Lesser General Public License
|
|
140
|
+
ever published by the Free Software Foundation.
|
|
141
|
+
|
|
142
|
+
If the Library as you received it specifies that a proxy can decide whether
|
|
143
|
+
future versions of the GNU Lesser General Public License shall apply, that
|
|
144
|
+
proxy's public statement of acceptance of any version is permanent authorization
|
|
145
|
+
for you to choose that version for the Library.
|
seed2lp-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: seed2lp
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Seed searching from network as SBML using Logic programming
|
|
5
|
+
Home-page: http://github.com/*/*
|
|
6
|
+
Author: Chabname Ghassemi Nedjad
|
|
7
|
+
Author-email: chabname.ghassemi-nedjad@inria.fr
|
|
8
|
+
License: GPL
|
|
9
|
+
Keywords: Answer Set Programming,wrapper,clingo
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Intended Audience :: Science/Research
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.5
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: ASP
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENCE.txt
|
|
20
|
+
Requires-Dist: clyngor>=0.3.18
|
|
21
|
+
Requires-Dist: pytest>=4.4.0
|
|
22
|
+
Requires-Dist: biseau>=0.0.16
|
|
23
|
+
Requires-Dist: cobra
|
|
24
|
+
Requires-Dist: clyngor-with-clingo
|
|
25
|
+
Requires-Dist: clingo-lpx
|
|
26
|
+
Requires-Dist: pyyaml
|
|
27
|
+
Requires-Dist: menetools
|
|
28
|
+
Requires-Dist: padmet
|
|
29
|
+
Provides-Extra: tests
|
|
30
|
+
Requires-Dist: pytest; extra == "tests"
|
|
31
|
+
|
|
32
|
+
# Seed2LP
|
|
33
|
+
|
|
34
|
+
Seed2LP is a Python tool that searches seeds in metabolic networks. It uses answer set programming (ASP) and provides three approaches for seed detection:
|
|
35
|
+
- [**Full network**](#full-network) mode, that activates all compounds of the metabolic network.
|
|
36
|
+
- [**Target**](#target) mode, that activates metabolites of interest.
|
|
37
|
+
- [**FBA**](#fba) mode, that randomly searches seeds ensuring a positive flux into the objective reaction
|
|
38
|
+
|
|
39
|
+
The notebook directory of this repo contains scripts that reproduce the results presented in the associated paper.
|
|
40
|
+
|
|
41
|
+
</br>
|
|
42
|
+
<hr style="border: 4px outset" size="8" >
|
|
43
|
+
|
|
44
|
+
## Install
|
|
45
|
+
|
|
46
|
+
**From github**
|
|
47
|
+
```
|
|
48
|
+
pip install git+https://github.com/bioasp/seed2lp
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**From repository source after git clone**
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
pip install .
|
|
55
|
+
```
|
|
56
|
+
or
|
|
57
|
+
```
|
|
58
|
+
python setup.py install
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
</br>
|
|
63
|
+
|
|
64
|
+
## Requirements
|
|
65
|
+
|
|
66
|
+
Requires Python >= 3.10.
|
|
67
|
+
|
|
68
|
+
For below requirements, installing Seed2LP will install all needed packages if not already installed.
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
| name | version |
|
|
73
|
+
|:----------:|:-------------:|
|
|
74
|
+
| [clyngor](https://github.com/Aluriak/clyngor) | 0.3.18 |
|
|
75
|
+
| [clingo-lpx](https://github.com/potassco/clingo-lpx) | 1.3.0 |
|
|
76
|
+
| [cobrapy](https://cobrapy.readthedocs.io/en/latest/index.html) | 0.26.0 |
|
|
77
|
+
| [pyyaml](https://pyyaml.org/wiki/PyYAMLDocumentation) | 6.0 |
|
|
78
|
+
| [menetools](https://github.com/cfrioux/MeneTools) | 3.4.0 |
|
|
79
|
+
| [padmet](https://github.com/AuReMe/padmet) | 5.0.1 |
|
|
80
|
+
|
|
81
|
+
<hr style="border: 4px outset" size="8" >
|
|
82
|
+
|
|
83
|
+
## Command examples
|
|
84
|
+
The following examples uses a toy described on Seed2LP paper.
|
|
85
|
+
|
|
86
|
+
> Get all solutions in all Target modes (Reasoning, Filter, Guess&Check, Guess&Check with Diversity, Hybrid lpx), in all optimisations (subset minimal and minimize)
|
|
87
|
+
>```
|
|
88
|
+
>seed2lp target networks/toys/SBML/toy_paper.SBML results/toys/
|
|
89
|
+
>```
|
|
90
|
+
|
|
91
|
+
> Get one solution in Full Network in reasoning and check flux
|
|
92
|
+
>```
|
|
93
|
+
>seed2lp full networks/toys/SBML/toy_paper.SBML results/toys/ -nbs 1 -so reasoning -cf
|
|
94
|
+
>```
|
|
95
|
+
|
|
96
|
+
> Get one solution in FBA only in subset minimal
|
|
97
|
+
>```
|
|
98
|
+
>seed2lp fba networks/toys/SBML/toy_paper.SBML results/toys/ -nbs 1 -m subsetmin
|
|
99
|
+
>```
|
|
100
|
+
|
|
101
|
+
<hr style="border: 4px outset" size="8" >
|
|
102
|
+
|
|
103
|
+
## 📜[Network analyse](documentations/network_analyse.mkd)
|
|
104
|
+
The first step of the tool is to read the network, analyse it to be able to perform a logic analyse of the Network, each reaction must be defined as follows:
|
|
105
|
+
|
|
106
|
+
$$ Reaction: Set\{reactants\} ⟶ Set\{products\} \quad with \quad bounds = [0,\infty]$$
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
For each reaction, multiple factors are verified and correction is done if needed such as swapping set of reactants and set of products if the boundaries of a reaction are negative or deleting reactions with null boundaries. A warning is outputted when changes are done.
|
|
110
|
+
|
|
111
|
+
📃 **Output example:**
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
WARNING :
|
|
115
|
+
- R_R2: Deleted.
|
|
116
|
+
Boundaries was: [0.0 ; 0.0]
|
|
117
|
+
- R_R7: Reactants and products switched.
|
|
118
|
+
Boundaries was: [-1000.0 ; 0.0]
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Search mode features
|
|
123
|
+
It is possible to run Seed2LP for all the 3 modes ([**Full network**](#full-network), [**Target**](#target) and [**FBA**](#fba) by changing the command, and for each one to use specifics arguments.
|
|
124
|
+
|
|
125
|
+
There are also 2 additional features:
|
|
126
|
+
- [**Network**](#network): allows drawing the network from the ASP definition and checking the network ASP decription by comparing with the Cobrapy description, or write into an SBML file the corrected network (exchanging products and reactants or delteing reaction with all boundaries to 0)
|
|
127
|
+
- [**Flux**](#flux): Allows checking the flux with Cobrapy from Seed2LP result files, or any file having the same json structure than Seed2LP.
|
|
128
|
+
|
|
129
|
+
<br/>
|
|
130
|
+
<hr style="border: 1px dotted" >
|
|
131
|
+
|
|
132
|
+
### 📜 [<ins>Full Network</ins>](documentations/full_network.mkd)
|
|
133
|
+
This mode searches seeds with this goal: "activate"/"produce" all reaction/metabolites of the network.
|
|
134
|
+
> 💻 **Command:**
|
|
135
|
+
>
|
|
136
|
+
> ```
|
|
137
|
+
> seed2lp full [network_file] [output_directory] [arguments]
|
|
138
|
+
> ```
|
|
139
|
+
|
|
140
|
+
There are also two submodes:
|
|
141
|
+
- 📜 [Reasoning](documentations/full_network.mkd#reasoning): Use ASP solving with clingo
|
|
142
|
+
- **Classic:** Use reasoning (logical, Boolean abstraction of metabolic activity) search only, without calculating flux into objective reaction
|
|
143
|
+
- **Filter:** Use reasoning search only, but for all results the flux is checked with [cobrapy](https://cobrapy.readthedocs.io/en/latest/index.html), and only the solutions having flux are returned.
|
|
144
|
+
- **Guess-check:** Use reasoning search and directly interact with the solver during solving by adding new constraints. Flux is checked with [cobrapy](https://cobrapy.readthedocs.io/en/latest/index.html) for every solution proposed by the solver and new constraints are derived out of it to guide the remaining solving process. All outputted solutions have flux natively.
|
|
145
|
+
- 📜 [Hybrid](documentations/full_network.mkd#hybrid): Ensure the resulting model statisfies both logical and flux constraints using a hybrid ASP-LP solver.
|
|
146
|
+
|
|
147
|
+
<br/>
|
|
148
|
+
<hr style="border: 1px dotted" >
|
|
149
|
+
|
|
150
|
+
### 📜 [<ins>Target</ins>](documentations/target.mkd)
|
|
151
|
+
This mode searches seeds with this goal: producing a set of metabolites, or if a reaction is given, ensuring the production of the reactants needed for its activation.
|
|
152
|
+
> 💻 **Command:**
|
|
153
|
+
>
|
|
154
|
+
> ```
|
|
155
|
+
> seed2lp target [network_file] [output_directory] [arguments]
|
|
156
|
+
> ```
|
|
157
|
+
|
|
158
|
+
There are also two submodes:
|
|
159
|
+
- 📜 [Reasoning](documentations/target.mkd): Use ASP solving with clingo
|
|
160
|
+
- **Classic:** Use reasoning (logical, Boolean abstraction of metabolic activity) search only, without calculating flux into objective reaction
|
|
161
|
+
- **Filter:** Use reasoning search only, but for all results the flux is checked with [cobrapy](https://cobrapy.readthedocs.io/en/latest/index.html), and only the solutions having flux are returned.
|
|
162
|
+
- **Guess-check:** Use reasoning search and directly interact with the solver during solving by adding new constraints. Flux is checked with [cobrapy](https://cobrapy.readthedocs.io/en/latest/index.html) for every solution proposed by the solver and new constraints are derived out of it to guide the remaining solving process. All outputted solutions have flux natively.
|
|
163
|
+
- 📜 [Hybrid](documentations/target.mkd): Ensure the resulting model statisfies both logical and flux constraints using a hybrid ASP-LP solver.
|
|
164
|
+
|
|
165
|
+
<br/>
|
|
166
|
+
<hr style="border: 1px dotted" >
|
|
167
|
+
|
|
168
|
+
### 📜 [<ins>FBA</ins>](documentations/fba.mkd)
|
|
169
|
+
This mode randomly searches seeds by ensuring flux on objective reaction.
|
|
170
|
+
|
|
171
|
+
> 💻 **Command:**
|
|
172
|
+
>
|
|
173
|
+
> ```
|
|
174
|
+
> seed2lp fba [network_file] [output_directory] [arguments]
|
|
175
|
+
> ```
|
|
176
|
+
|
|
177
|
+
</br>
|
|
178
|
+
<hr style="border: 4px outset" size="8" >
|
|
179
|
+
|
|
180
|
+
## set-mode features
|
|
181
|
+
It is possible to choose what kind of set of seeds to search.
|
|
182
|
+
|
|
183
|
+
### <ins>Subset minimal</ins>
|
|
184
|
+
The subset minimal (submin) mode finds a set of seeds which satisfies all the constraints, then from this set, it tries to eliminate seeds until it finds the minimal set that will satisfy the constraints.
|
|
185
|
+
|
|
186
|
+
This method of search **does not guarantee minimality** in terms of size of the set. But it can be a **faster way** to have set of seeds the most minimal possible from a set already validated.
|
|
187
|
+
|
|
188
|
+
> 📃 **Example:**
|
|
189
|
+
>
|
|
190
|
+
> Considering all the followings sets of seeds below, that statisfy constraints for the objective, which of them are subset minimal and will be selected?
|
|
191
|
+
>
|
|
192
|
+
> | Sets of seeds | is choosen ? | reasons |
|
|
193
|
+
> |:--------------:|:---------------:|:-------------:|
|
|
194
|
+
> | {A,B,C,D,E} | no | {A,B,C} is a set of seeds included into this set|
|
|
195
|
+
> | {A,B,C} | yes | There is no other set smaller included in this set|
|
|
196
|
+
> | {A,D,E,F} | no |{A,D,F} is a set of seeds included into this set |
|
|
197
|
+
> | {A,D,F} | yes | There is no other set smaller included in this set |
|
|
198
|
+
> | {A,C,E,F} | yes | There is no other set smaller included in this set|
|
|
199
|
+
|
|
200
|
+
<br/>
|
|
201
|
+
<hr style="border: 1px dotted" >
|
|
202
|
+
|
|
203
|
+
### <ins>Minimize</ins>
|
|
204
|
+
The minimize (min) set-mode finds set of seeds of minimal size which satisfies all the constraints.
|
|
205
|
+
|
|
206
|
+
This method of search **ensures minimality**. But it is computationally more demanding.
|
|
207
|
+
|
|
208
|
+
> 📃 **Example:**
|
|
209
|
+
>
|
|
210
|
+
> Considering all the followings sets of seeds below, that statisfy constraints for the objective, which of them are of minimal size and will be selected?
|
|
211
|
+
>
|
|
212
|
+
> | Sets of seeds | is choosen ? | reasons |
|
|
213
|
+
> |:--------------:|:---------------:|:-------------:|
|
|
214
|
+
> | {A,B,C,D,E} | no | There is a smaller set of size 3 existing |
|
|
215
|
+
> | {A,B,C} | yes | This a one of the smaller set |
|
|
216
|
+
> | {A,D,E,F} | no | There is a smaller set of size 3 existing |
|
|
217
|
+
> | {A,D,F} | yes | This a one of the smaller set |
|
|
218
|
+
> | {A,C,E,F} | no | There is a smaller set of size 3 existing|
|
|
219
|
+
|
|
220
|
+
</br>
|
|
221
|
+
|
|
222
|
+
</br>
|
|
223
|
+
<hr style="border: 4px outset" size="8" >
|
|
224
|
+
|
|
225
|
+
## Results
|
|
226
|
+
For each mode, a result json file is created. This file will write all models for all submodes reasoning / hybrid and **set-mode** subset minimial / minimize.
|
|
227
|
+
|
|
228
|
+
If the check-flux option is used, `-cf` / `--check-flux`, a tsv file is created with all the fluxes calculated with Cobrapy, and if hybrid submode or fba mode is used, the LP flux found (calculated from ASP).
|
|
229
|
+
|
|
230
|
+
The results are also written in the terminal.
|
|
231
|
+
|
|
232
|
+
</br>
|
|
233
|
+
<hr style="border: 4px outset" size="8" >
|
|
234
|
+
|
|
235
|
+
## Additional features
|
|
236
|
+
### 📜 [<ins>Network</ins>](documentations/network.mkd)
|
|
237
|
+
This feature can reconstruct a very basic picture of the network from the ASP conversion of the source network (in SBML format).
|
|
238
|
+
- It can create the picture with the reaction names, or without the reaction.
|
|
239
|
+
- It can also create all the reactions description / formula from ASP and Cobrapy and give a difference of both contents.
|
|
240
|
+
- It can write an SBML file derived from the SBML sources after correction of the network
|
|
241
|
+
- Deletion of reaction with boundaries [0,0]
|
|
242
|
+
- Exchanging set of reactants and products when boundaries negatives: ie [-1000, 0], [-100; -10], ...
|
|
243
|
+
|
|
244
|
+
> 💻 **Command:**
|
|
245
|
+
>
|
|
246
|
+
> `seed2lp network [network_file] [output_directory] [arguments]`
|
|
247
|
+
|
|
248
|
+
<br/>
|
|
249
|
+
<hr style="border: 1px dotted" >
|
|
250
|
+
|
|
251
|
+
### 📜 [<ins>Flux</ins>](documentations/flux.mkd)
|
|
252
|
+
This feature allows the calculation, using Cobrapy library, of the flux of the objective function from a result file of seed2lp and save them. This can be a validation of the solutions provided by Seed2LP.
|
|
253
|
+
|
|
254
|
+
> 💻 **Command:**
|
|
255
|
+
>
|
|
256
|
+
> `seed2lp flux [network_file] [seed2lp_result_file]`
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
> 📝 **Notes:**
|
|
261
|
+
>
|
|
262
|
+
> It is possible to do the flux calculation using Cobrapy directly after the seed search by using the argument `-cf` / `--check-flux` on each mode. A tsv file is created with all the fluxes calculated with Cobrapy, and if hybrid submode or fba mode is used, the LP flux found (calculated from ASP).
|
|
263
|
+
|
|
264
|
+
</br>
|
|
265
|
+
<hr style="border: 4px outset" size="8" >
|
|
266
|
+
|
|
267
|
+
## Main 📜 [options](documentations/options.mkd) for [search mode features](#search-mode-features)
|
|
268
|
+
|
|
269
|
+
### <ins>Data given by user</ins>
|
|
270
|
+
|
|
271
|
+
| option | short| default | description | search mode |
|
|
272
|
+
|:----------------------:|:----:|:--------:|:------------:|:-------------:|
|
|
273
|
+
| --targets-file | -tf | optional | List of metabolites⭐ and/or <br/>an objective🔆 reaction as file | Target |
|
|
274
|
+
| --objective | -o | optional | An objective🔆 reaction <br/> as command line | Full Network and FBA |
|
|
275
|
+
| --seeds-file | -sf | optional | List of metabolites⭐ known to be seeds and will <br/> be in the initial set of seeds| ALL |
|
|
276
|
+
| --possible-seeds-file | -psf | optional | List of metabolites⭐ among which the seed selection will be performed <br/> be in the set of seeds | ALL |
|
|
277
|
+
| --forbidden-seeds-file | -fsf | optional | List of metabolites⭐ that can not <br/> be in the set of seeds | ALL |
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
> 📝 **Notes:**
|
|
281
|
+
>
|
|
282
|
+
> **Target** search mode :
|
|
283
|
+
>
|
|
284
|
+
> - If **no target file** given, the targets will be the **reactants of the objective reaction** found in the SBML file. The flux calculation will be done **on the objective objective reaction** found in the SBML file.
|
|
285
|
+
> - If only **Metabolites** given in the file: the targets will be **these given metabolites**. The flux calculation will be done on the **objective objective reaction** found in the SBML file.
|
|
286
|
+
> - If only **Reaction** given in the file: the targets will be the **reactants of the objective reaction** found in the SBML file. The flux calculation will be done **on this given reaction**
|
|
287
|
+
> - If both **Metabolites** and **Reaction** given in the file: the targets will be **these given metabolites**. The flux calculation will be done **on this given reaction**
|
|
288
|
+
>
|
|
289
|
+
> **Full network** (**hybrid** submode) and **FBA** :
|
|
290
|
+
>
|
|
291
|
+
>If no objective reaction given, the objective reaction will be the one found in the SBML file for flux calculation.
|
|
292
|
+
|
|
293
|
+
> 💬 **Comments:**
|
|
294
|
+
>
|
|
295
|
+
> ⭐ One metabolite by line, must be prefixed with "M_" to fit the ID of the SBML file.
|
|
296
|
+
>
|
|
297
|
+
> 🔆 One Objective reaction only, must be prefixed with "R_" to fit the ID of the SBML file.
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
<br/>
|
|
301
|
+
<hr style="border: 1px dotted" >
|
|
302
|
+
|
|
303
|
+
### <ins>Set mode</ins>
|
|
304
|
+
|
|
305
|
+
| option | short| default | description | search mode |
|
|
306
|
+
|:-----------:|:----:|:--------:|:------------:|:-------------:|
|
|
307
|
+
| --mode | -m | subsetmin | run different set modes: <br/> minimize, subsetmin, all | ALL |
|
|
308
|
+
| --solve | -so | reasoning | run different submodes: <br/> reasoning, filter, gues-check, hybrid, all | Full Network<br> and Target |
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
<br/>
|
|
312
|
+
<hr style="border: 1px dotted" >
|
|
313
|
+
|
|
314
|
+
### <ins>Set of seed restrictions</ins>
|
|
315
|
+
|
|
316
|
+
| option | short| default | description | search mode |
|
|
317
|
+
|:----------------------:|:----:|:--------:|:------------:|:-------------:|
|
|
318
|
+
| --targets-as-seeds | -tas | False | If used, targets found are given, <br/> allowed to be in the set of seeds | ALL |
|
|
319
|
+
| --topological-injection | -ti | False | If used, the exchange⭐ metabolite <br/> from source file are set as seeds directly | ALL |
|
|
320
|
+
| --keep-import-reactions | -kir | False | If used, the exchange⭐ reactions <br/> are not deleted during the conversion to ASP| ALL |
|
|
321
|
+
| --accumulation | -accu | False | If used, solutions with possible <br/> accumulating metabolites are allowed | Full Network <br/> and Target |
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
> 💬 **Comments:**
|
|
325
|
+
>
|
|
326
|
+
> ⭐ An **exchange reaction** is defined as a reaction having **one or multiple metabolites** as reactants or products (while the other set must be empty), it represent import or export reactions, and can be reversible or not, written forwards or backwards:
|
|
327
|
+
> - R ⟶ ∅ $\quad$|$\quad$ R ⟷ ∅ $\quad$|$\quad$ R ⟵ ∅
|
|
328
|
+
> - ∅ ⟶ P $\quad$|$\quad$ ∅ ⟷ P $\quad$|$\quad$ ∅ ⟵ P
|
|
329
|
+
>
|
|
330
|
+
> An **exchange metabolite** will be the metabolite involved in the exchange reaction
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
<br/>
|
|
334
|
+
<hr style="border: 1px dotted" >
|
|
335
|
+
|
|
336
|
+
### <ins>Flux</ins>
|
|
337
|
+
|
|
338
|
+
| option | short| default | description | search mode |
|
|
339
|
+
|:----------------------:|:----:|:--------:|:------------:|:-------------:|
|
|
340
|
+
| --check-flux | -cf | False | If used, the Cobrapy flux calculation <br/> from seeds will be executed and saved | ALL |
|
|
341
|
+
| --maximize-flux | -max | False | If used, the flux calculation <br/> with ASP will be maximized | ALL⭐ |
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
> 💬 **Comments:**
|
|
345
|
+
>
|
|
346
|
+
> ⭐ The option is used only in [Hybrid](documentations/hybrid.mkd) mode for [Full Network](documentations/full_network.mkd) and [Target](documentations/target.mkd) search mode features.
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
</br>
|
|
350
|
+
<hr style="border: 4px outset" size="8" >
|
|
351
|
+
|
|
352
|
+
## Configuration file
|
|
353
|
+
The application has its own configuration file located [here: seed2lp/config.yaml](seed2lp/config.yaml).
|
|
354
|
+
|
|
355
|
+
It is possible to use another configuration file by using the option `-conf` or `--config-file`.
|
|
356
|
+
|
|
357
|
+
But all these configurations are overwritten by the arguments if used. The config file is used as "the default configuration" of your app.
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
</br>
|
|
361
|
+
<hr style="border: 4px outset" size="8" >
|
|
362
|
+
|
|
363
|
+
## Output files
|
|
364
|
+
### Result file
|
|
365
|
+
|
|
366
|
+
<br/>
|
|
367
|
+
<hr style="border: 1px dotted" >
|
|
368
|
+
|
|
369
|
+
### Flux file
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
</br>
|
|
373
|
+
<hr style="border: 4px outset" size="8" >
|
|
374
|
+
<hr style="border: 4px outset" size="8" >
|
|
375
|
+
|
|
376
|
+
## Troubleshooting
|
|
377
|
+
### GCC version
|
|
378
|
+
Seed2Lp needs a gcc version >= 7.
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
> 💻 Linux Commands:
|
|
382
|
+
>
|
|
383
|
+
> **Check your version:**
|
|
384
|
+
>```
|
|
385
|
+
>gcc --version
|
|
386
|
+
>```
|
|
387
|
+
>
|
|
388
|
+
> **Install latest version (here v11):**
|
|
389
|
+
>```
|
|
390
|
+
> sudo apt install gcc-11
|
|
391
|
+
>```
|
|
392
|
+
>
|
|
393
|
+
> **Link to the latest version (here v11):**
|
|
394
|
+
>```
|
|
395
|
+
> sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 20
|
|
396
|
+
>```
|
|
397
|
+
> **Check your version:**
|
|
398
|
+
>```
|
|
399
|
+
>gcc --version
|
|
400
|
+
>```
|