|
492
|
1 # Installation
|
|
|
2
|
|
|
3 This guide walks you through installing COBRAxy on your system.
|
|
|
4
|
|
|
5 ## System Requirements
|
|
|
6
|
|
542
|
7 - **Python**: 3.8-3.13
|
|
492
|
8 - **Operating System**: Linux (recommended), macOS, Windows
|
|
542
|
9 - **Build tools**: C/C++ compiler (gcc, clang, or MSVC), CMake, pkg-config
|
|
|
10
|
|
|
11 ## System Dependencies
|
|
|
12
|
|
|
13 Install required build tools before installing COBRAxy:
|
|
|
14
|
|
|
15 ```bash
|
|
|
16 # Ubuntu/Debian
|
|
|
17 sudo apt-get install build-essential cmake pkg-config libvips libglpk40 glpk-utils
|
|
|
18
|
|
|
19 # macOS
|
|
|
20 xcode-select --install
|
|
|
21 brew install cmake pkg-config vips glpk
|
|
|
22
|
|
|
23 # Windows (with Chocolatey)
|
|
|
24 choco install cmake visualstudio2022buildtools pkgconfiglite
|
|
|
25 ```
|
|
|
26
|
|
|
27 ## Installation Methods
|
|
492
|
28
|
|
542
|
29 ### Recommended: Using Conda
|
|
|
30
|
|
|
31 Create an isolated environment with all dependencies:
|
|
|
32
|
|
|
33 ```bash
|
|
|
34 # Create a new conda environment
|
|
|
35 conda create -n cobraxy python=3.13 -y
|
|
|
36 conda activate cobraxy
|
|
492
|
37
|
|
542
|
38 # Install build tools via conda
|
|
|
39 conda install -c conda-forge cmake pkg-config swiglpk -y
|
|
|
40
|
|
|
41 # Clone and install COBRAxy
|
|
|
42 git clone https://github.com/CompBtBs/COBRAxy.git
|
|
|
43 cd COBRAxy/src
|
|
|
44 pip install .
|
|
|
45 ```
|
|
|
46
|
|
|
47 ### Alternative: Direct Installation
|
|
|
48
|
|
|
49 If you have system dependencies already installed:
|
|
492
|
50
|
|
|
51 ```bash
|
|
|
52 # Clone the repository
|
|
|
53 git clone https://github.com/CompBtBs/COBRAxy.git
|
|
542
|
54 cd COBRAxy/src
|
|
492
|
55
|
|
|
56 # Install COBRAxy
|
|
|
57 pip install .
|
|
|
58 ```
|
|
|
59
|
|
542
|
60 ### Development Install
|
|
492
|
61
|
|
|
62 For development or if you want to modify COBRAxy:
|
|
|
63
|
|
|
64 ```bash
|
|
542
|
65 # Clone and install in editable mode
|
|
492
|
66 git clone https://github.com/CompBtBs/COBRAxy.git
|
|
542
|
67 cd COBRAxy/src
|
|
492
|
68 pip install -e .
|
|
|
69 ```
|
|
|
70
|
|
|
71 ## Verify Installation
|
|
|
72
|
|
|
73 Test your installation:
|
|
|
74
|
|
|
75 ```bash
|
|
|
76 # Check if COBRAxy tools are available
|
|
|
77 ras_generator --help
|
|
|
78 flux_simulation --help
|
|
542
|
79 marea --help
|
|
|
80
|
|
|
81 # Check Python can import COBRAxy modules
|
|
|
82 python -c "import ras_generator; print('COBRAxy installed successfully!')"
|
|
|
83 ```
|
|
|
84
|
|
|
85 ## Troubleshooting Installation
|
|
|
86
|
|
|
87 ### Missing Compiler Errors
|
|
|
88
|
|
|
89 If you see errors about missing compilers during installation:
|
|
|
90
|
|
|
91 ```bash
|
|
|
92 # Ubuntu/Debian
|
|
|
93 sudo apt-get install build-essential
|
|
|
94
|
|
|
95 # macOS
|
|
|
96 xcode-select --install
|
|
492
|
97 ```
|
|
|
98
|
|
542
|
99 ### CMake Not Found
|
|
|
100
|
|
|
101 ```bash
|
|
|
102 # Ubuntu/Debian
|
|
|
103 sudo apt-get install cmake
|
|
|
104
|
|
|
105 # macOS
|
|
|
106 brew install cmake
|
|
|
107
|
|
|
108 # Or via conda
|
|
|
109 conda install -c conda-forge cmake
|
|
|
110 ```
|
|
|
111
|
|
|
112 ### pkg-config Issues
|
|
|
113
|
|
|
114 ```bash
|
|
|
115 # Ubuntu/Debian
|
|
|
116 sudo apt-get install pkg-config
|
|
|
117
|
|
|
118 # macOS
|
|
|
119 brew install pkg-config
|
|
|
120
|
|
|
121 # Or via conda
|
|
|
122 conda install -c conda-forge pkg-config
|
|
|
123 ```
|
|
|
124
|
|
|
125 ## Alternative: Virtual Environment (without Conda)
|
|
492
|
126
|
|
|
127 Using a virtual environment prevents conflicts with other Python packages:
|
|
|
128
|
|
|
129 ```bash
|
|
|
130 # Create virtual environment
|
|
|
131 python -m venv cobraxy-env
|
|
|
132
|
|
|
133 # Activate environment
|
|
|
134 source cobraxy-env/bin/activate # Linux/macOS
|
|
|
135 # cobraxy-env\Scripts\activate # Windows
|
|
|
136
|
|
|
137 # Install COBRAxy
|
|
542
|
138 cd COBRAxy/src
|
|
492
|
139 pip install .
|
|
|
140
|
|
|
141 # When done, deactivate
|
|
|
142 deactivate
|
|
|
143 ```
|
|
|
144
|
|
|
145 ## Next Steps
|
|
|
146
|
|
|
147 After successful installation:
|
|
|
148
|
|
542
|
149 1. **[Quick Start Guide](/quickstart.md)** - Run your first analysis
|
|
|
150 2. **[Tutorial: Galaxy Setup](/tutorials/galaxy-setup.md)** - Set up web interface
|
|
492
|
151
|
|
|
152 ## Getting Help
|
|
|
153
|
|
|
154 If you encounter issues:
|
|
|
155
|
|
542
|
156 1. Check the [Troubleshooting Guide](/troubleshooting.md)
|
|
492
|
157 2. Search [existing issues](https://github.com/CompBtBs/COBRAxy/issues)
|
|
|
158 3. Create a [new issue](https://github.com/CompBtBs/COBRAxy/issues/new) with:
|
|
|
159 - Your operating system
|
|
|
160 - Python version (`python --version`)
|
|
|
161 - Complete error message
|
|
|
162 - Installation method used |