comparison COBRAxy/docs/troubleshooting.md @ 542:fcdbc81feb45 draft

Uploaded
author francesco_lapi
date Sun, 26 Oct 2025 19:27:41 +0000
parents 4ed95023af20
children
comparison
equal deleted inserted replaced
541:fa93040a75af 542:fcdbc81feb45
2 2
3 Common issues and solutions when using COBRAxy. 3 Common issues and solutions when using COBRAxy.
4 4
5 ## Installation Issues 5 ## Installation Issues
6 6
7 ### Missing Build Tools
8
9 **Problem**: `gcc: command not found` or compilation errors (Linux/macOS)
10 ```bash
11 # Ubuntu/Debian
12 sudo apt-get install build-essential cmake pkg-config
13
14 # macOS
15 xcode-select --install
16 brew install cmake pkg-config
17 ```
18
19 **Problem**: `CMake not found`
20 ```bash
21 # Ubuntu/Debian
22 sudo apt-get install cmake
23
24 # macOS
25 brew install cmake
26
27 # Or via conda
28 conda install -c conda-forge cmake
29 ```
30
7 ### Python Import Errors 31 ### Python Import Errors
8 32
9 **Problem**: `ModuleNotFoundError: No module named 'cobra'` 33 **Problem**: `ModuleNotFoundError: No module named 'cobra'`
10 ```bash 34 ```bash
11 # Solution: Install missing dependencies 35 # Solution: Reinstall COBRAxy with dependencies
12 pip install cobra pandas numpy scipy 36 cd COBRAxy/src
13 37 pip install .
14 # Or reinstall COBRAxy 38
15 cd COBRAxy 39 # Or install missing dependency directly
16 pip install -e . 40 pip install cobra
17 ``` 41 ```
18 42
19 **Problem**: `ImportError: No module named 'cobraxy'` 43 **Problem**: `ImportError: No module named 'cobraxy'`
20 ```python 44 ```python
21 # Solution: Add COBRAxy to Python path 45 # Solution: Ensure COBRAxy is installed
46 pip install /path/to/COBRAxy/src/
47
48 # Or add to Python path temporarily
22 import sys 49 import sys
23 sys.path.insert(0, '/path/to/COBRAxy') 50 sys.path.insert(0, '/path/to/COBRAxy/src')
24 ``` 51 ```
25 52
26 ### System Dependencies 53 ### System Dependencies
27 54
28 **Problem**: GLPK solver not found 55 **Problem**: GLPK solver not found
62 89
63 **Problem**: Many "gene not found" warnings 90 **Problem**: Many "gene not found" warnings
64 ```python 91 ```python
65 # Check gene overlap with model 92 # Check gene overlap with model
66 import pickle 93 import pickle
67 genes_dict = pickle.load(open('local/pickle files/ENGRO2_genes.p', 'rb')) 94 genes_dict = pickle.load(open('src/local/pickle files/ENGRO2_genes.p', 'rb'))
68 model_genes = set(genes_dict['hugo_id'].keys()) 95 model_genes = set(genes_dict['hugo_id'].keys())
69 96
70 import pandas as pd 97 import pandas as pd
71 data_genes = set(pd.read_csv('expression.tsv', sep='\t').iloc[:, 0]) 98 data_genes = set(pd.read_csv('expression.tsv', sep='\t').iloc[:, 0])
72 99
242 # Create clean environment 269 # Create clean environment
243 conda create -n cobraxy python=3.9 270 conda create -n cobraxy python=3.9
244 conda activate cobraxy 271 conda activate cobraxy
245 272
246 # Install COBRAxy fresh 273 # Install COBRAxy fresh
247 cd COBRAxy 274 cd COBRAxy/src
248 pip install -e . 275 pip install -e .
249 ``` 276 ```
250 277
251 ### Cross-Platform Issues 278 ### Cross-Platform Issues
252 279
326 4. **Command/parameters used**: Exact command or Python code 353 4. **Command/parameters used**: Exact command or Python code
327 5. **Expected vs actual behavior**: What should happen vs what happens 354 5. **Expected vs actual behavior**: What should happen vs what happens
328 355
329 ### Community Resources 356 ### Community Resources
330 357
331 - **GitHub Issues**: [Report bugs](https://github.com/CompBtBs/COBRAxy/issues) 358 - **GitHub Issues**: [Report bugs and ask questions](https://github.com/CompBtBs/COBRAxy/issues)
332 - **Discussions**: [Ask questions](https://github.com/CompBtBs/COBRAxy/discussions)
333 - **COBRApy Community**: [General metabolic modeling help](https://github.com/opencobra/cobrapy) 359 - **COBRApy Community**: [General metabolic modeling help](https://github.com/opencobra/cobrapy)
334 360
335 ### Self-Help Checklist 361 ### Self-Help Checklist
336 362
337 Before reporting issues: 363 Before reporting issues: