492
|
1 # Installation
|
|
2
|
|
3 This guide walks you through installing COBRAxy on your system.
|
|
4
|
|
5 ## System Requirements
|
|
6
|
|
7 - **Python**: 3.8-3.11
|
|
8 - **Operating System**: Linux (recommended), macOS, Windows
|
|
9 - **Storage**: 2GB free space for installation and temporary files
|
|
10
|
|
11 ## Quick Install
|
|
12
|
|
13 The fastest way to install COBRAxy:
|
|
14
|
|
15 ```bash
|
|
16 # Clone the repository
|
|
17 git clone https://github.com/CompBtBs/COBRAxy.git
|
|
18 cd COBRAxy
|
|
19
|
|
20 # Install COBRAxy
|
|
21 pip install .
|
|
22 ```
|
|
23
|
|
24 ## Development Install
|
|
25
|
|
26 For development or if you want to modify COBRAxy:
|
|
27
|
|
28 ```bash
|
|
29 # Clone and install in development mode
|
|
30 git clone https://github.com/CompBtBs/COBRAxy.git
|
|
31 cd COBRAxy
|
|
32 pip install -e .
|
|
33 ```
|
|
34
|
|
35 ## Dependencies
|
|
36
|
|
37 COBRAxy automatically installs its Python dependencies:
|
|
38
|
|
39 - **COBRApy** - Core metabolic modeling
|
|
40 - **pandas** - Data manipulation
|
|
41 - **numpy** - Numerical computations
|
|
42 - **scipy** - Scientific computing
|
|
43
|
|
44 ## Optional System Libraries
|
|
45
|
|
46 Install additional libraries for enhanced features:
|
|
47
|
|
48 ### Ubuntu/Debian
|
|
49
|
|
50 ```bash
|
|
51 # Install GLPK solver
|
|
52 sudo apt-get update
|
|
53 sudo apt-get install libglpk40 glpk-utils
|
|
54
|
|
55 # Install libvips for SVG processing
|
|
56 sudo apt-get install libvips
|
|
57
|
|
58 # Install Python GLPK bindings
|
|
59 pip install swiglpk
|
|
60 ```
|
|
61
|
|
62 ### macOS
|
|
63
|
|
64 ```bash
|
|
65 # Using Homebrew
|
|
66 brew install glpk vips
|
|
67
|
|
68 # Install Python bindings
|
|
69 pip install swiglpk
|
|
70 ```
|
|
71
|
|
72 ### Windows
|
|
73
|
|
74 ```bash
|
|
75 # Using conda (recommended for Windows)
|
|
76 conda install -c conda-forge glpk
|
|
77
|
|
78 # Or using pip
|
|
79 pip install swiglpk
|
|
80 ```
|
|
81
|
|
82 ## Verify Installation
|
|
83
|
|
84 Test your installation:
|
|
85
|
|
86 ```bash
|
|
87 # Check if COBRAxy tools are available
|
|
88 ras_generator --help
|
|
89 flux_simulation --help
|
|
90
|
|
91 # Test with example data (if available)
|
|
92 cd COBRAxy
|
|
93 python testing.py
|
|
94 ```
|
|
95
|
|
96 ## Troubleshooting Installation
|
|
97
|
|
98 ### Common Issues
|
|
99
|
|
100 **Import Error: No module named 'cobra'**
|
|
101 ```bash
|
|
102 # Install COBRApy manually
|
|
103 pip install cobra
|
|
104 ```
|
|
105
|
|
106 **GLPK solver not found**
|
|
107 ```bash
|
|
108 # Install GLPK solver
|
|
109 # Ubuntu/Debian: sudo apt-get install glpk-utils
|
|
110 # macOS: brew install glpk
|
|
111 # Then: pip install swiglpk
|
|
112 ```
|
|
113
|
|
114 **Permission denied errors**
|
|
115 ```bash
|
|
116 # Use user installation
|
|
117 pip install --user .
|
|
118 # Or use virtual environment (recommended)
|
|
119 python -m venv cobraxy-env
|
|
120 source cobraxy-env/bin/activate # Linux/macOS
|
|
121 # cobraxy-env\Scripts\activate # Windows
|
|
122 pip install .
|
|
123 ```
|
|
124
|
|
125 ## Virtual Environment (Recommended)
|
|
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
|
|
138 pip install .
|
|
139
|
|
140 # When done, deactivate
|
|
141 deactivate
|
|
142 ```
|
|
143
|
|
144 ## Next Steps
|
|
145
|
|
146 After successful installation:
|
|
147
|
|
148 1. **[Quick Start Guide](quickstart.md)** - Run your first analysis
|
|
149 2. **[Tutorial: Python API](tutorials/python-api.md)** - Learn programmatic usage
|
|
150 3. **[Tutorial: Galaxy Setup](tutorials/galaxy-setup.md)** - Set up web interface
|
|
151
|
|
152 ## Getting Help
|
|
153
|
|
154 If you encounter issues:
|
|
155
|
|
156 1. Check the [Troubleshooting Guide](troubleshooting.md)
|
|
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 |