492
|
1 # RPS Generator
|
|
2
|
|
3 Generate Reaction Propensity Scores (RPS) from metabolite abundance data.
|
|
4
|
|
5 ## Overview
|
|
6
|
|
7 The RPS Generator computes reaction propensity scores based on metabolite abundance measurements. RPS values indicate how likely metabolic reactions are to be active based on the availability of their substrate and product metabolites.
|
|
8
|
|
9 ## Usage
|
|
10
|
|
11 ### Command Line
|
|
12
|
|
13 ```bash
|
|
14 rps_generator -td /path/to/COBRAxy \
|
|
15 -id metabolite_abundance.tsv \
|
|
16 -rp output_rps.tsv \
|
|
17 -ol log.txt
|
|
18 ```
|
|
19
|
|
20 ### Galaxy Interface
|
|
21
|
|
22 Select "RPS Generator" from the COBRAxy tool suite and upload your metabolite abundance file.
|
|
23
|
|
24 ## Parameters
|
|
25
|
|
26 ### Required Parameters
|
|
27
|
|
28 | Parameter | Flag | Description |
|
|
29 |-----------|------|-------------|
|
|
30 | Tool Directory | `-td, --tool_dir` | Path to COBRAxy installation directory |
|
|
31 | Input Dataset | `-id, --input` | Metabolite abundance TSV file (rows=metabolites, cols=samples) |
|
|
32 | RPS Output | `-rp, --rps_output` | Output file path for RPS scores |
|
|
33
|
|
34 ### Optional Parameters
|
|
35
|
|
36 | Parameter | Flag | Description | Default |
|
|
37 |-----------|------|-------------|---------|
|
|
38 | Custom Reactions | `-rl, --model_upload` | Path to custom reactions file | Built-in reactions |
|
|
39 | Output Log | `-ol, --out_log` | Log file for warnings/errors | Standard output |
|
|
40
|
|
41 ## Input Format
|
|
42
|
|
43 ### Metabolite Abundance File
|
|
44
|
|
45 Tab-separated values (TSV) format:
|
|
46
|
|
47 ```
|
|
48 Metabolite Sample1 Sample2 Sample3
|
|
49 glucose 100.5 85.2 92.7
|
|
50 pyruvate 45.3 38.9 41.2
|
|
51 lactate 15.8 22.1 18.5
|
|
52 ```
|
|
53
|
|
54 **Requirements:**
|
|
55 - First column: metabolite names (case-insensitive)
|
|
56 - Subsequent columns: abundance values for each sample
|
|
57 - Missing values: use 0 or leave empty
|
|
58 - File encoding: UTF-8
|
|
59
|
|
60 ### Custom Reactions File (Optional)
|
|
61
|
|
62 If using custom reactions instead of built-in ones:
|
|
63
|
|
64 ```
|
|
65 ReactionID Reaction
|
|
66 R00001 glucose + ATP -> glucose-6-phosphate + ADP
|
|
67 R00002 glucose-6-phosphate <-> fructose-6-phosphate
|
|
68 ```
|
|
69
|
|
70 ## Output Format
|
|
71
|
|
72 ### RPS Scores File
|
|
73
|
|
74 ```
|
|
75 Reaction Sample1 Sample2 Sample3
|
|
76 R00001 0.85 0.72 0.79
|
|
77 R00002 0.45 0.38 0.52
|
|
78 R00003 0.12 0.28 0.21
|
|
79 ```
|
|
80
|
|
81 - Values range from 0 (low propensity) to 1 (high propensity)
|
|
82 - NaN values indicate insufficient metabolite data for that reaction
|
|
83
|
|
84 ## Algorithm
|
|
85
|
|
86 1. **Metabolite Matching**: Input metabolite names are matched against internal synonyms
|
|
87 2. **Abundance Normalization**: Raw abundances are normalized per sample
|
|
88 3. **Reaction Scoring**: For each reaction, RPS is computed based on:
|
|
89 - Substrate availability (geometric mean of substrate abundances)
|
|
90 - Product formation potential
|
|
91 - Stoichiometric coefficients
|
|
92
|
|
93 ## Examples
|
|
94
|
|
95 ### Basic Usage
|
|
96
|
|
97 ```bash
|
|
98 # Generate RPS from metabolite data
|
|
99 rps_generator -td /opt/COBRAxy \
|
|
100 -id /data/metabolomics.tsv \
|
|
101 -rp /results/rps_scores.tsv
|
|
102 ```
|
|
103
|
|
104 ### With Custom Reactions
|
|
105
|
|
106 ```bash
|
|
107 # Use custom reaction set
|
|
108 rps_generator -td /opt/COBRAxy \
|
|
109 -id /data/metabolomics.tsv \
|
|
110 -rl /custom/reactions.tsv \
|
|
111 -rp /results/custom_rps.tsv \
|
|
112 -ol /logs/rps.log
|
|
113 ```
|
|
114
|
|
115 ## Tips and Best Practices
|
|
116
|
|
117 ### Data Preparation
|
|
118
|
|
119 - **Metabolite Names**: Use standard nomenclature (KEGG, ChEBI, or common names)
|
|
120 - **Missing Data**: Remove samples with >50% missing metabolites
|
|
121 - **Outliers**: Consider log-transformation for highly variable metabolites
|
|
122 - **Replicates**: Average technical replicates before analysis
|
|
123
|
|
124 ### Quality Control
|
|
125
|
|
126 - Check log file for unmatched metabolite names
|
|
127 - Verify RPS score distributions (should span 0-1 range)
|
|
128 - Compare results with expected pathway activities
|
|
129
|
|
130 ### Integration with Other Tools
|
|
131
|
|
132 RPS scores are typically used with:
|
|
133 - [MAREA](marea.md) for pathway enrichment analysis
|
|
134 - [Flux to Map](flux-to-map.md) for metabolic map visualization
|
|
135
|
|
136 ## Troubleshooting
|
|
137
|
|
138 ### Common Issues
|
|
139
|
|
140 **No RPS scores generated**
|
|
141 - Check metabolite name format and spelling
|
|
142 - Verify input file has correct TSV format
|
|
143 - Ensure tool directory contains reaction databases
|
|
144
|
|
145 **Many NaN values in output**
|
|
146 - Insufficient metabolite coverage for reactions
|
|
147 - Consider using a smaller, more focused reaction set
|
|
148
|
|
149 **Memory errors**
|
|
150 - Reduce dataset size or split into batches
|
|
151 - Increase available system memory
|
|
152
|
|
153 ### Error Messages
|
|
154
|
|
155 | Error | Cause | Solution |
|
|
156 |-------|--------|----------|
|
|
157 | "File not found" | Missing input file | Check file path and permissions |
|
|
158 | "Invalid format" | Malformed TSV | Verify column headers and data types |
|
|
159 | "No metabolites matched" | Name mismatch | Check metabolite nomenclature |
|
|
160
|
|
161 ## See Also
|
|
162
|
|
163 - [RAS Generator](ras-generator.md) - Generate reaction activity scores from gene expression
|
|
164 - [MAREA](marea.md) - Statistical analysis and visualization
|
|
165 - [Flux Simulation](flux-simulation.md) - Constraint-based modeling |