cnapy 1.2.1__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.
Files changed (76) hide show
  1. cnapy-1.2.1/LICENSE +201 -0
  2. cnapy-1.2.1/PKG-INFO +216 -0
  3. cnapy-1.2.1/README.md +186 -0
  4. cnapy-1.2.1/cnapy/__init__.py +16 -0
  5. cnapy-1.2.1/cnapy/__main__.py +37 -0
  6. cnapy-1.2.1/cnapy/appdata.py +539 -0
  7. cnapy-1.2.1/cnapy/application.py +241 -0
  8. cnapy-1.2.1/cnapy/core.py +372 -0
  9. cnapy-1.2.1/cnapy/core_gui.py +37 -0
  10. cnapy-1.2.1/cnapy/data/blank.svg +259 -0
  11. cnapy-1.2.1/cnapy/data/check.svg +4 -0
  12. cnapy-1.2.1/cnapy/data/clear.svg +7 -0
  13. cnapy-1.2.1/cnapy/data/cnapylogo.svg +707 -0
  14. cnapy-1.2.1/cnapy/data/cnapylogo_no_text.svg +252 -0
  15. cnapy-1.2.1/cnapy/data/cross.svg +6 -0
  16. cnapy-1.2.1/cnapy/data/d-font.svg +21 -0
  17. cnapy-1.2.1/cnapy/data/default-bg.svg +258 -0
  18. cnapy-1.2.1/cnapy/data/default-color.svg +150 -0
  19. cnapy-1.2.1/cnapy/data/escher.min.js +78 -0
  20. cnapy-1.2.1/cnapy/data/escher_cnapy.html +305 -0
  21. cnapy-1.2.1/cnapy/data/heat.svg +143 -0
  22. cnapy-1.2.1/cnapy/data/onoff.svg +117 -0
  23. cnapy-1.2.1/cnapy/data/qmark.svg +5 -0
  24. cnapy-1.2.1/cnapy/data/redo.svg +44 -0
  25. cnapy-1.2.1/cnapy/data/save.svg +16 -0
  26. cnapy-1.2.1/cnapy/data/undo.svg +35 -0
  27. cnapy-1.2.1/cnapy/data/zoom-in.svg +16 -0
  28. cnapy-1.2.1/cnapy/data/zoom-out.svg +16 -0
  29. cnapy-1.2.1/cnapy/flux_vector_container.py +88 -0
  30. cnapy-1.2.1/cnapy/gui_elements/__init__.py +16 -0
  31. cnapy-1.2.1/cnapy/gui_elements/about_dialog.py +50 -0
  32. cnapy-1.2.1/cnapy/gui_elements/annotation_widget.py +120 -0
  33. cnapy-1.2.1/cnapy/gui_elements/box_position_dialog.py +79 -0
  34. cnapy-1.2.1/cnapy/gui_elements/central_widget.py +784 -0
  35. cnapy-1.2.1/cnapy/gui_elements/clipboard_calculator.py +136 -0
  36. cnapy-1.2.1/cnapy/gui_elements/config_cobrapy_dialog.py +146 -0
  37. cnapy-1.2.1/cnapy/gui_elements/config_dialog.py +274 -0
  38. cnapy-1.2.1/cnapy/gui_elements/configuration_cplex.py +179 -0
  39. cnapy-1.2.1/cnapy/gui_elements/configuration_gurobi.py +139 -0
  40. cnapy-1.2.1/cnapy/gui_elements/download_dialog.py +82 -0
  41. cnapy-1.2.1/cnapy/gui_elements/efm_dialog.py +212 -0
  42. cnapy-1.2.1/cnapy/gui_elements/efmtool_dialog.py +114 -0
  43. cnapy-1.2.1/cnapy/gui_elements/escher_map_view.py +268 -0
  44. cnapy-1.2.1/cnapy/gui_elements/flux_feasibility_dialog.py +571 -0
  45. cnapy-1.2.1/cnapy/gui_elements/flux_optimization_dialog.py +121 -0
  46. cnapy-1.2.1/cnapy/gui_elements/gene_list.py +292 -0
  47. cnapy-1.2.1/cnapy/gui_elements/in_out_flux_dialog.py +42 -0
  48. cnapy-1.2.1/cnapy/gui_elements/main_window.py +2445 -0
  49. cnapy-1.2.1/cnapy/gui_elements/map_view.py +736 -0
  50. cnapy-1.2.1/cnapy/gui_elements/mcs_dialog.py +454 -0
  51. cnapy-1.2.1/cnapy/gui_elements/metabolite_list.py +479 -0
  52. cnapy-1.2.1/cnapy/gui_elements/mode_navigator.py +459 -0
  53. cnapy-1.2.1/cnapy/gui_elements/model_info.py +106 -0
  54. cnapy-1.2.1/cnapy/gui_elements/plot_space_dialog.py +211 -0
  55. cnapy-1.2.1/cnapy/gui_elements/reaction_table_widget.py +96 -0
  56. cnapy-1.2.1/cnapy/gui_elements/reactions_list.py +1001 -0
  57. cnapy-1.2.1/cnapy/gui_elements/rename_map_dialog.py +48 -0
  58. cnapy-1.2.1/cnapy/gui_elements/scenario_tab.py +525 -0
  59. cnapy-1.2.1/cnapy/gui_elements/solver_buttons.py +78 -0
  60. cnapy-1.2.1/cnapy/gui_elements/strain_design_dialog.py +1845 -0
  61. cnapy-1.2.1/cnapy/gui_elements/thermodynamics_dialog.py +614 -0
  62. cnapy-1.2.1/cnapy/gui_elements/yield_optimization_dialog.py +143 -0
  63. cnapy-1.2.1/cnapy/gui_elements/yield_space_dialog.py +143 -0
  64. cnapy-1.2.1/cnapy/resources.py +21575 -0
  65. cnapy-1.2.1/cnapy/sd_ci_optmdfpathway.py +322 -0
  66. cnapy-1.2.1/cnapy/sd_class_interface.py +884 -0
  67. cnapy-1.2.1/cnapy/utils.py +293 -0
  68. cnapy-1.2.1/cnapy/utils_for_cnapy_api.py +104 -0
  69. cnapy-1.2.1/cnapy.egg-info/PKG-INFO +216 -0
  70. cnapy-1.2.1/cnapy.egg-info/SOURCES.txt +74 -0
  71. cnapy-1.2.1/cnapy.egg-info/dependency_links.txt +1 -0
  72. cnapy-1.2.1/cnapy.egg-info/requires.txt +15 -0
  73. cnapy-1.2.1/cnapy.egg-info/top_level.txt +1 -0
  74. cnapy-1.2.1/pyproject.toml +25 -0
  75. cnapy-1.2.1/setup.cfg +4 -0
  76. cnapy-1.2.1/setup.py +30 -0
cnapy-1.2.1/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
cnapy-1.2.1/PKG-INFO ADDED
@@ -0,0 +1,216 @@
1
+ Metadata-Version: 2.1
2
+ Name: cnapy
3
+ Version: 1.2.1
4
+ Summary: An integrated environment for metabolic network analysis.
5
+ Author: Sven Thiele, Pavlos Stephanos Bekiaris, Philipp Schneider
6
+ Author-email: Axel von Kamp <vonkamp@mpi-magdeburg.mpg.de>
7
+ Project-URL: Homepage, https://github.com/cnapy-org/CNApy
8
+ Project-URL: Issues, https://github.com/cnapy-org/CNApy/issues
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
11
+ Classifier: Operating System :: OS Independent
12
+ Requires-Python: ==3.10.*
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: appdirs>=1.4
16
+ Requires-Dist: matplotlib>=3.6
17
+ Requires-Dist: requests>=2.28
18
+ Requires-Dist: cobra>=0.29
19
+ Requires-Dist: efmtool_link>=0.0.7
20
+ Requires-Dist: optlang_enumerator>=0.0.12
21
+ Requires-Dist: straindesign>=1.12
22
+ Requires-Dist: qtpy>=2.3
23
+ Requires-Dist: pyqtwebengine>=5.15
24
+ Requires-Dist: qtconsole==5.4
25
+ Requires-Dist: gurobi
26
+ Requires-Dist: cplex>=22.1
27
+ Requires-Dist: numpy==1.23
28
+ Requires-Dist: scipy==1.12
29
+ Requires-Dist: openpyxl
30
+
31
+ # CNApy: An integrated environment for metabolic modeling
32
+
33
+ [![Latest stable release](https://flat.badgen.net/github/release/cnapy-org/cnapy/stable)](https://github.com/cnapy-org/CNApy/releases/latest)
34
+ [![Last commit](https://flat.badgen.net/github/last-commit/cnapy-org/cnapy)](https://github.com/cnapy-org/CNApy/commits/master)
35
+ [![Open issues](https://flat.badgen.net/github/open-issues/cnapy-org/cnapy)](https://github.com/cnapy-org/CNApy/issues)
36
+ [![Gitter chat](https://flat.badgen.net/gitter/members/cnapy-org/community)](https://gitter.im/cnapy-org/community)
37
+
38
+ ![CNApy screenshot](screenshot.png)
39
+
40
+ ## Introduction
41
+
42
+ **If you have questions, suggestions or bug reports regarding CNApy, you can use either of the [CNApy GitHub issues](https://github.com/cnapy-org/CNApy/issues), the [CNApy GitHub discussions](https://github.com/cnapy-org/CNApy/discussions) or the [CNApy Gitter chat room](https://gitter.im/cnapy-org/community).**
43
+
44
+ CNApy is a Python-based graphical user interface for a) many common methods of Constraint-Based Reconstruction and Analysis (COBRA) with stoichiometric metabolic models, b) the visualization of COBRA calculation results and c) the creation and editing of metabolic models.
45
+
46
+ Supported COBRA methods (partly provided by [cobrapy](https://opencobra.github.io/cobrapy/)) include:
47
+
48
+ - Flux Balance Analysis (FBA)
49
+ - Flux Variability Analysis (FVA)
50
+ - Making measured flux scenarios stoichiometrically feasible
51
+ - Elementary Flux Modes (EFM)
52
+ - Thermodynamic methods based on [OptMDFpathway](https://doi.org/10.1371/journal.pcbi.1006492)
53
+ - Many advanced strain design algorithms such as [OptKnock](https://doi.org/10.1002/bit.10803), [RobustKnock](https://doi.org/10.1093/bioinformatics/btp704), [OptCouple](https://doi.org/10.1016/j.mec.2019.e00087) and [advanced Minimal Cut Sets](https://doi.org/10.1371/journal.pcbi.1008110) through its integration of the [StrainDesign](https://github.com/klamt-lab/straindesign) package
54
+ - Yield optimization (based on linear-fractional programming)
55
+ - Phase plane analysis
56
+
57
+ All calculation results can be visualized in CNApy's interactive and editable metabolic maps. These maps can also use vector-based (SVG) backgrounds. [Escher maps](https://escher.github.io/#/) are also natively supported and can be created and edited inside CNApy.
58
+
59
+ Aside of performing calculations on metabolic models, CNApy can also be used to create and/or edit metabolic models. This includes all important aspects of the model's reactions, metabolites and genes. For model loading and export, CNApy supports the widely used [SBML standard format](https://sbml.org/).
60
+
61
+ **For more details on CNApy's many more features, see section [Documentation and Tutorials](#documentation-and-tutorials).**
62
+
63
+ **For information about how to install CNApy, see section [Installation Options](#installation-options).**
64
+
65
+ **For information about how to contribute to CNApy as a developer, see section [Contribute to the CNApy development](#contribute-to-the-cnapy-development).**
66
+
67
+ **If you want to cite CNApy, see section [How to cite CNApy](#how-to-cite-cnapy).**
68
+
69
+ *Associated project note*: If you want to use the well-known MATLAB-based *CellNetAnalyzer* (CNA), *which is not compatible with CNApy*, you can download it from [CNA's website](https://www2.mpi-magdeburg.mpg.de/projects/cna/cna.html).
70
+
71
+ ## Documentation and Tutorials
72
+
73
+ - The [CNApy guide](https://cnapy-org.github.io/CNApy-guide/) contains information for all major functions of CNApy.
74
+ - Our [CNApy YouTube channel](https://www.youtube.com/channel/UCRIXSdzs5WnBE3_uukuNMlg) provides some videos of working with CNApy.
75
+ - We also provide directly usable [CNApy example projects](https://github.com/cnapy-org/CNApy-projects/releases/latest) which include some of the most common *E. coli* models. These projects can also be downloaded within CNApy at its first start-up or via CNApy's File menu.
76
+
77
+ ## Installation Options
78
+
79
+ There are 4 alternative ways to install CNApy:
80
+
81
+ 1. If you use Windows, the easiest way is to use our Windows installer, see section [Using the Windows installer](#using-the-windows-installer).
82
+ 2. If you already have installed [Anaconda](https://www.anaconda.com/), [Miniconda](https://docs.anaconda.com/free/miniconda/index.html) or [Miniforge](https://github.com/conda-forge/miniforge) on your computer, you can directly install CNApy as a conda package as described in section [Install CNApy as conda package](#install-cnapy-as-conda-package). *Note*: If you're on MacOS and want to use CPLEX as solver, you have to use the x86 version of Anaconda as the Apple Silicon one is not supported by CPLEX yet.
83
+ 3. If you use Linux or Apple MacOS X, the easiest installation producure is our assisted installation protocol, see [Assisted installation under Linux and MacOS X](#assisted-installation-under-linux-and-macos-x).
84
+ 4. If you want to develop CNApy, follow the instruction for the cloning and setup of the CNApy repository using git and conda or mamba in section [Setup the CNApy development environment](#setup-the-cnapy-development-environment).
85
+
86
+ ## Contribute to the CNApy development
87
+
88
+ Everyone is welcome to contribute to CNApy's development. [See our contribution file for more detailed instructions](https://github.com/cnapy-org/CNApy/blob/master/CONTRIBUTING.md).
89
+
90
+ ## Using the Windows installer
91
+
92
+ 1. Download the zipped CNApy Windows installer [from here](https://github.com/cnapy-org/CNApy/releases/download/v1.2.1/cnapy-windows-installer.zip).
93
+ 2. Unzip the file into your desired location. You can do this by right-clicking on the file and selecting the option to extract the files.
94
+ 3. In the location where you unzipped the file, click on "INSTALL_CNAPY.bat"; This installation procedure only works with an active internet conncection. As soon as the installation is finished, the appearing window closes and you can start CNApy either by double-clicking on the newly created CNApy shortcut on your desktop (which also shows CNApy's logo) or the newly created RUN_CNAPY.bat in the folder where INSTALL_CNAPY.bat lies. If CNApy is not starting, this might have been caused by an internet connection problem; Running "INSTALL_CNAPY.bat" again might solve the problem. To uninstall CNApy, double-click on the UNINSTALL_CNAPY.bat in the same folder.
95
+
96
+ ## Assisted installation under Linux and MacOS X
97
+
98
+ Click on the operating system you use:
99
+
100
+ - [Linux](#assisted-linux-installation)
101
+ - [Apple MacOS X](#assisted-macos-x-installation)
102
+
103
+ ### Assisted Linux installation
104
+
105
+ 1. Download Miniforge [from here](https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh).
106
+ 2. Install Miniforge by double-clicking the downloaded file. If the script does not run, right-click on the file, open its settings and select the option to make it executable (alternative: run 'chmod u+x ./Miniconda3-latest-Linux-x86_64.sh' in your terminal). Follow the appearing installation instructions and remember in which folder you install Miniconda. *Note*: If you already have installed Anaconda on your computer before (for which we also directly provide a conda CNApy package, [see here](#install-cnapy-as-conda-package)), deactivate all installation options which put Miniconda to your console or system PATH to avoid possible problems.
107
+ 3. Using your file manager, go to the folder where you installed Miniforge. Then, open the appearing sub-folder "condabin".
108
+ 4. Download the CNApy installation assistant script [from here](https://github.com/cnapy-org/CNApy/releases/download/v1.2.1/cnapy-assistant-script.sh) into the mentioned "condabin" folder.
109
+ 5. In the file manager, double-click on the newly downloaded installation assistant script which is called "cnapy-assistant-script.sh". If the script does not run, right-click on the file, open its settings and select the option to make it executable or, alternatively, run 'chmod u+x ./cnapy-assistant-script.sh' in your terminal in the mentioned "condabin" folder. Wait until CNApy is downloaded and installed.
110
+ 6. You can now run CNApy by executing the following two terminal instructions in the mentioned "condabin" folder:
111
+
112
+ ```sh
113
+ ./conda activate cnapy-1.2.1
114
+ cnapy
115
+ ```
116
+
117
+ If you installed Miniforge system-wide, it's also possible to run these commands in any other terminal folder.
118
+
119
+ ### Assisted MacOS X installation
120
+
121
+ *Note*: Currently, if you want to use the CPLEX solver within CNApy, you have to install the Intel processor version of Miniconda regardless of your Mac's processor. This is caused by the lack of a CPLEX ARM Python package ([see also this issue for more details](https://github.com/cnapy-org/CNApy/issues/491)).
122
+
123
+ 1. If you have a (new) Mac with an ARM processor, such as the M1, M2 or M3, download Miniconda [from here](https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.pkg). If you have an (older) Mac with an Intel processor, download Miniconda [from here](https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.pkg). If you are unsure which processor your Mac has, click on the Apple menu in the upper-left of your screen and choose "About This Mac".
124
+ 2. Install Miniconda by double-clicking the downloaded file. Follow the appearing installation instructions and remember in which folder you install Miniconda. *Note*: If you already use Anaconda on your computer (for which we directly provide a conda CNApy package, [see here](#install-cnapy-as-conda-package)), deactivate all installation options which put Miniconda to your console or system PATH to avoid possible problems
125
+ 3. Using Finder, go to the folder where you installed Miniconda. Then, open the appearing sub-folder "condabin".
126
+ 4. Download the CNApy installation assistant script [from here](https://github.com/cnapy-org/CNApy/releases/download/v1.2.1/cnapy-assistant-script.sh) into the mentioned "condabin" folder.
127
+ 5. In the file manager, double-click on the newly downloaded installation assistant script which is called "cnapy-installation-script.sh". If the script does not run, right-click on the file, open its settings and select the option to make it executable (alternative: run 'chmod u+x ./cnapy-assistant-script.sh' in your terminal). Wait until CNApy is downloaded and installed.
128
+ 6. Open the terminal in the mentioned "condabin" folder. You can now run CNApy by executing the following two terminal instructions:
129
+
130
+ ```sh
131
+ ./conda activate cnapy-1.2.1
132
+ cnapy
133
+ ```
134
+
135
+ ## Install CNApy as conda package
136
+
137
+ *Note for Mac users (does not affect Windows or Linux users)*: Currently, if you want to use the CPLEX solver within CNApy, you have to install the Intel processor version of Anaconda/Miniconda/Miniforge regardless of your Mac's processor. This is caused by the lack of a CPLEX ARM Python package ([see also this issue for more details](https://github.com/cnapy-org/CNApy/issues/491)).
138
+
139
+ *Note for all users*: If you've installed mamba on your system (e.g., with [Miniforge](https://github.com/conda-forge/miniforge)), it is the recommended way to install CNApy as it is much faster than conda. To use mamba, just replace the "conda" command in the following steps with "mamba".
140
+
141
+ 1. Create a conda environment with all dependencies
142
+
143
+ ```sh
144
+ conda create -n cnapy-1.2.1 -c Gurobi -c IBMDecisionOptimization -c conda-forge -c cnapy cnapy=1.2.1 --yes
145
+ ```
146
+
147
+ 2. Activate the cnapy conda environment
148
+
149
+ ```sh
150
+ conda activate cnapy-1.2.1
151
+ ```
152
+
153
+ 3. Run CNApy within you activated conda environment
154
+
155
+ ```sh
156
+ cnapy
157
+ ```
158
+
159
+ Furthermore, you can also perform the following optional steps:
160
+
161
+ 4. (optional and only possible if you have already installed CNApy by using conda) If you already have a cnapy environment, e.g., cnapy-1.X.X, you can delete it with the command
162
+
163
+ ```sh
164
+ # Here, the Xs stand for the last CNApy version you've installed by using conda
165
+ conda env remove -n cnapy-1.X.X
166
+ ```
167
+
168
+ 5. (optional, but recommended if you also use other Python distributions or Anaconda environments) In order to solve potential package version problems, set a systems variable called "PYTHONNOUSERSITE" to the value "True".
169
+
170
+ Under Linux systems, you can do this with the following command:
171
+
172
+ ```sh
173
+ export PYTHONNOUSERSITE=True
174
+ ```
175
+
176
+ Under Windows systems, you can do this by searching for your system's "environmental variables" and adding
177
+ the variable PYTHONNOUSERSITE with the value True using Window's environmental variables setting window.
178
+
179
+ ## Setup the CNApy development environment
180
+
181
+ We use conda as package manager to install all dependencies. You can use [miniconda](https://docs.conda.io/en/latest/miniconda.html).
182
+ If you have conda installed you can:
183
+
184
+ 1. Create a conda development environment with all dependencies
185
+
186
+ ```sh
187
+ conda env create -n cnapy-dev -f environment.yml
188
+ ```
189
+
190
+ 2. Activate the development environment
191
+
192
+ ```sh
193
+ conda activate cnapy-dev
194
+ ```
195
+
196
+ 3. Checkout the latest cnapy development version using git
197
+
198
+ ```sh
199
+ git clone https://github.com/cnapy-org/CNApy.git
200
+ ```
201
+
202
+ 4. Change into the source directory and run CNApy
203
+
204
+ ```sh
205
+ cd CNApy
206
+ python cnapy.py
207
+ ```
208
+
209
+ Any contribution intentionally submitted for inclusion in the work by you, shall be licensed under the terms of the Apache 2.0 license without any additional terms or conditions.
210
+
211
+ ## How to cite CNApy
212
+
213
+ If you use CNApy in your scientific work, please consider to cite CNApy's publication:
214
+
215
+ Thiele et al. (2022). CNApy: a CellNetAnalyzer GUI in Python for analyzing and designing metabolic networks.
216
+ *Bioinformatics* 38, 1467-1469, [doi.org/10.1093/bioinformatics/btab828](https://doi.org/10.1093/bioinformatics/btab828).
cnapy-1.2.1/README.md ADDED
@@ -0,0 +1,186 @@
1
+ # CNApy: An integrated environment for metabolic modeling
2
+
3
+ [![Latest stable release](https://flat.badgen.net/github/release/cnapy-org/cnapy/stable)](https://github.com/cnapy-org/CNApy/releases/latest)
4
+ [![Last commit](https://flat.badgen.net/github/last-commit/cnapy-org/cnapy)](https://github.com/cnapy-org/CNApy/commits/master)
5
+ [![Open issues](https://flat.badgen.net/github/open-issues/cnapy-org/cnapy)](https://github.com/cnapy-org/CNApy/issues)
6
+ [![Gitter chat](https://flat.badgen.net/gitter/members/cnapy-org/community)](https://gitter.im/cnapy-org/community)
7
+
8
+ ![CNApy screenshot](screenshot.png)
9
+
10
+ ## Introduction
11
+
12
+ **If you have questions, suggestions or bug reports regarding CNApy, you can use either of the [CNApy GitHub issues](https://github.com/cnapy-org/CNApy/issues), the [CNApy GitHub discussions](https://github.com/cnapy-org/CNApy/discussions) or the [CNApy Gitter chat room](https://gitter.im/cnapy-org/community).**
13
+
14
+ CNApy is a Python-based graphical user interface for a) many common methods of Constraint-Based Reconstruction and Analysis (COBRA) with stoichiometric metabolic models, b) the visualization of COBRA calculation results and c) the creation and editing of metabolic models.
15
+
16
+ Supported COBRA methods (partly provided by [cobrapy](https://opencobra.github.io/cobrapy/)) include:
17
+
18
+ - Flux Balance Analysis (FBA)
19
+ - Flux Variability Analysis (FVA)
20
+ - Making measured flux scenarios stoichiometrically feasible
21
+ - Elementary Flux Modes (EFM)
22
+ - Thermodynamic methods based on [OptMDFpathway](https://doi.org/10.1371/journal.pcbi.1006492)
23
+ - Many advanced strain design algorithms such as [OptKnock](https://doi.org/10.1002/bit.10803), [RobustKnock](https://doi.org/10.1093/bioinformatics/btp704), [OptCouple](https://doi.org/10.1016/j.mec.2019.e00087) and [advanced Minimal Cut Sets](https://doi.org/10.1371/journal.pcbi.1008110) through its integration of the [StrainDesign](https://github.com/klamt-lab/straindesign) package
24
+ - Yield optimization (based on linear-fractional programming)
25
+ - Phase plane analysis
26
+
27
+ All calculation results can be visualized in CNApy's interactive and editable metabolic maps. These maps can also use vector-based (SVG) backgrounds. [Escher maps](https://escher.github.io/#/) are also natively supported and can be created and edited inside CNApy.
28
+
29
+ Aside of performing calculations on metabolic models, CNApy can also be used to create and/or edit metabolic models. This includes all important aspects of the model's reactions, metabolites and genes. For model loading and export, CNApy supports the widely used [SBML standard format](https://sbml.org/).
30
+
31
+ **For more details on CNApy's many more features, see section [Documentation and Tutorials](#documentation-and-tutorials).**
32
+
33
+ **For information about how to install CNApy, see section [Installation Options](#installation-options).**
34
+
35
+ **For information about how to contribute to CNApy as a developer, see section [Contribute to the CNApy development](#contribute-to-the-cnapy-development).**
36
+
37
+ **If you want to cite CNApy, see section [How to cite CNApy](#how-to-cite-cnapy).**
38
+
39
+ *Associated project note*: If you want to use the well-known MATLAB-based *CellNetAnalyzer* (CNA), *which is not compatible with CNApy*, you can download it from [CNA's website](https://www2.mpi-magdeburg.mpg.de/projects/cna/cna.html).
40
+
41
+ ## Documentation and Tutorials
42
+
43
+ - The [CNApy guide](https://cnapy-org.github.io/CNApy-guide/) contains information for all major functions of CNApy.
44
+ - Our [CNApy YouTube channel](https://www.youtube.com/channel/UCRIXSdzs5WnBE3_uukuNMlg) provides some videos of working with CNApy.
45
+ - We also provide directly usable [CNApy example projects](https://github.com/cnapy-org/CNApy-projects/releases/latest) which include some of the most common *E. coli* models. These projects can also be downloaded within CNApy at its first start-up or via CNApy's File menu.
46
+
47
+ ## Installation Options
48
+
49
+ There are 4 alternative ways to install CNApy:
50
+
51
+ 1. If you use Windows, the easiest way is to use our Windows installer, see section [Using the Windows installer](#using-the-windows-installer).
52
+ 2. If you already have installed [Anaconda](https://www.anaconda.com/), [Miniconda](https://docs.anaconda.com/free/miniconda/index.html) or [Miniforge](https://github.com/conda-forge/miniforge) on your computer, you can directly install CNApy as a conda package as described in section [Install CNApy as conda package](#install-cnapy-as-conda-package). *Note*: If you're on MacOS and want to use CPLEX as solver, you have to use the x86 version of Anaconda as the Apple Silicon one is not supported by CPLEX yet.
53
+ 3. If you use Linux or Apple MacOS X, the easiest installation producure is our assisted installation protocol, see [Assisted installation under Linux and MacOS X](#assisted-installation-under-linux-and-macos-x).
54
+ 4. If you want to develop CNApy, follow the instruction for the cloning and setup of the CNApy repository using git and conda or mamba in section [Setup the CNApy development environment](#setup-the-cnapy-development-environment).
55
+
56
+ ## Contribute to the CNApy development
57
+
58
+ Everyone is welcome to contribute to CNApy's development. [See our contribution file for more detailed instructions](https://github.com/cnapy-org/CNApy/blob/master/CONTRIBUTING.md).
59
+
60
+ ## Using the Windows installer
61
+
62
+ 1. Download the zipped CNApy Windows installer [from here](https://github.com/cnapy-org/CNApy/releases/download/v1.2.1/cnapy-windows-installer.zip).
63
+ 2. Unzip the file into your desired location. You can do this by right-clicking on the file and selecting the option to extract the files.
64
+ 3. In the location where you unzipped the file, click on "INSTALL_CNAPY.bat"; This installation procedure only works with an active internet conncection. As soon as the installation is finished, the appearing window closes and you can start CNApy either by double-clicking on the newly created CNApy shortcut on your desktop (which also shows CNApy's logo) or the newly created RUN_CNAPY.bat in the folder where INSTALL_CNAPY.bat lies. If CNApy is not starting, this might have been caused by an internet connection problem; Running "INSTALL_CNAPY.bat" again might solve the problem. To uninstall CNApy, double-click on the UNINSTALL_CNAPY.bat in the same folder.
65
+
66
+ ## Assisted installation under Linux and MacOS X
67
+
68
+ Click on the operating system you use:
69
+
70
+ - [Linux](#assisted-linux-installation)
71
+ - [Apple MacOS X](#assisted-macos-x-installation)
72
+
73
+ ### Assisted Linux installation
74
+
75
+ 1. Download Miniforge [from here](https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh).
76
+ 2. Install Miniforge by double-clicking the downloaded file. If the script does not run, right-click on the file, open its settings and select the option to make it executable (alternative: run 'chmod u+x ./Miniconda3-latest-Linux-x86_64.sh' in your terminal). Follow the appearing installation instructions and remember in which folder you install Miniconda. *Note*: If you already have installed Anaconda on your computer before (for which we also directly provide a conda CNApy package, [see here](#install-cnapy-as-conda-package)), deactivate all installation options which put Miniconda to your console or system PATH to avoid possible problems.
77
+ 3. Using your file manager, go to the folder where you installed Miniforge. Then, open the appearing sub-folder "condabin".
78
+ 4. Download the CNApy installation assistant script [from here](https://github.com/cnapy-org/CNApy/releases/download/v1.2.1/cnapy-assistant-script.sh) into the mentioned "condabin" folder.
79
+ 5. In the file manager, double-click on the newly downloaded installation assistant script which is called "cnapy-assistant-script.sh". If the script does not run, right-click on the file, open its settings and select the option to make it executable or, alternatively, run 'chmod u+x ./cnapy-assistant-script.sh' in your terminal in the mentioned "condabin" folder. Wait until CNApy is downloaded and installed.
80
+ 6. You can now run CNApy by executing the following two terminal instructions in the mentioned "condabin" folder:
81
+
82
+ ```sh
83
+ ./conda activate cnapy-1.2.1
84
+ cnapy
85
+ ```
86
+
87
+ If you installed Miniforge system-wide, it's also possible to run these commands in any other terminal folder.
88
+
89
+ ### Assisted MacOS X installation
90
+
91
+ *Note*: Currently, if you want to use the CPLEX solver within CNApy, you have to install the Intel processor version of Miniconda regardless of your Mac's processor. This is caused by the lack of a CPLEX ARM Python package ([see also this issue for more details](https://github.com/cnapy-org/CNApy/issues/491)).
92
+
93
+ 1. If you have a (new) Mac with an ARM processor, such as the M1, M2 or M3, download Miniconda [from here](https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.pkg). If you have an (older) Mac with an Intel processor, download Miniconda [from here](https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.pkg). If you are unsure which processor your Mac has, click on the Apple menu in the upper-left of your screen and choose "About This Mac".
94
+ 2. Install Miniconda by double-clicking the downloaded file. Follow the appearing installation instructions and remember in which folder you install Miniconda. *Note*: If you already use Anaconda on your computer (for which we directly provide a conda CNApy package, [see here](#install-cnapy-as-conda-package)), deactivate all installation options which put Miniconda to your console or system PATH to avoid possible problems
95
+ 3. Using Finder, go to the folder where you installed Miniconda. Then, open the appearing sub-folder "condabin".
96
+ 4. Download the CNApy installation assistant script [from here](https://github.com/cnapy-org/CNApy/releases/download/v1.2.1/cnapy-assistant-script.sh) into the mentioned "condabin" folder.
97
+ 5. In the file manager, double-click on the newly downloaded installation assistant script which is called "cnapy-installation-script.sh". If the script does not run, right-click on the file, open its settings and select the option to make it executable (alternative: run 'chmod u+x ./cnapy-assistant-script.sh' in your terminal). Wait until CNApy is downloaded and installed.
98
+ 6. Open the terminal in the mentioned "condabin" folder. You can now run CNApy by executing the following two terminal instructions:
99
+
100
+ ```sh
101
+ ./conda activate cnapy-1.2.1
102
+ cnapy
103
+ ```
104
+
105
+ ## Install CNApy as conda package
106
+
107
+ *Note for Mac users (does not affect Windows or Linux users)*: Currently, if you want to use the CPLEX solver within CNApy, you have to install the Intel processor version of Anaconda/Miniconda/Miniforge regardless of your Mac's processor. This is caused by the lack of a CPLEX ARM Python package ([see also this issue for more details](https://github.com/cnapy-org/CNApy/issues/491)).
108
+
109
+ *Note for all users*: If you've installed mamba on your system (e.g., with [Miniforge](https://github.com/conda-forge/miniforge)), it is the recommended way to install CNApy as it is much faster than conda. To use mamba, just replace the "conda" command in the following steps with "mamba".
110
+
111
+ 1. Create a conda environment with all dependencies
112
+
113
+ ```sh
114
+ conda create -n cnapy-1.2.1 -c Gurobi -c IBMDecisionOptimization -c conda-forge -c cnapy cnapy=1.2.1 --yes
115
+ ```
116
+
117
+ 2. Activate the cnapy conda environment
118
+
119
+ ```sh
120
+ conda activate cnapy-1.2.1
121
+ ```
122
+
123
+ 3. Run CNApy within you activated conda environment
124
+
125
+ ```sh
126
+ cnapy
127
+ ```
128
+
129
+ Furthermore, you can also perform the following optional steps:
130
+
131
+ 4. (optional and only possible if you have already installed CNApy by using conda) If you already have a cnapy environment, e.g., cnapy-1.X.X, you can delete it with the command
132
+
133
+ ```sh
134
+ # Here, the Xs stand for the last CNApy version you've installed by using conda
135
+ conda env remove -n cnapy-1.X.X
136
+ ```
137
+
138
+ 5. (optional, but recommended if you also use other Python distributions or Anaconda environments) In order to solve potential package version problems, set a systems variable called "PYTHONNOUSERSITE" to the value "True".
139
+
140
+ Under Linux systems, you can do this with the following command:
141
+
142
+ ```sh
143
+ export PYTHONNOUSERSITE=True
144
+ ```
145
+
146
+ Under Windows systems, you can do this by searching for your system's "environmental variables" and adding
147
+ the variable PYTHONNOUSERSITE with the value True using Window's environmental variables setting window.
148
+
149
+ ## Setup the CNApy development environment
150
+
151
+ We use conda as package manager to install all dependencies. You can use [miniconda](https://docs.conda.io/en/latest/miniconda.html).
152
+ If you have conda installed you can:
153
+
154
+ 1. Create a conda development environment with all dependencies
155
+
156
+ ```sh
157
+ conda env create -n cnapy-dev -f environment.yml
158
+ ```
159
+
160
+ 2. Activate the development environment
161
+
162
+ ```sh
163
+ conda activate cnapy-dev
164
+ ```
165
+
166
+ 3. Checkout the latest cnapy development version using git
167
+
168
+ ```sh
169
+ git clone https://github.com/cnapy-org/CNApy.git
170
+ ```
171
+
172
+ 4. Change into the source directory and run CNApy
173
+
174
+ ```sh
175
+ cd CNApy
176
+ python cnapy.py
177
+ ```
178
+
179
+ Any contribution intentionally submitted for inclusion in the work by you, shall be licensed under the terms of the Apache 2.0 license without any additional terms or conditions.
180
+
181
+ ## How to cite CNApy
182
+
183
+ If you use CNApy in your scientific work, please consider to cite CNApy's publication:
184
+
185
+ Thiele et al. (2022). CNApy: a CellNetAnalyzer GUI in Python for analyzing and designing metabolic networks.
186
+ *Bioinformatics* 38, 1467-1469, [doi.org/10.1093/bioinformatics/btab828](https://doi.org/10.1093/bioinformatics/btab828).
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env python3
2
+ #
3
+ # Copyright 2022 CNApy organization
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ # -*- coding: utf-8 -*-