|
492
|
1 # RAS Generator
|
|
|
2
|
|
547
|
3 Compute Reaction Activity Scores (RAS) from gene expression data.
|
|
492
|
4
|
|
|
5 ## Overview
|
|
|
6
|
|
547
|
7 RAS Generator computes reaction activity scores by evaluating GPR rules with gene expression values.
|
|
|
8
|
|
|
9 ## Galaxy Interface
|
|
|
10
|
|
|
11 In Galaxy: **COBRAxy → Expression2RAS**
|
|
492
|
12
|
|
547
|
13 1. Select built-in model or upload custom GPR rules
|
|
|
14 2. Upload gene expression data
|
|
|
15 3. Click **Run tool**
|
|
|
16
|
|
|
17 ## Command-line console
|
|
|
18
|
|
|
19 ```bash
|
|
|
20 ras_generator -rs ENGRO2 \
|
|
|
21 -in expression_data.tsv \
|
|
|
22 -ra ras_scores.tsv \
|
|
|
23 -ol ras_generation.log
|
|
|
24 ```
|
|
492
|
25
|
|
|
26 ## Parameters
|
|
|
27
|
|
547
|
28 | Parameter | Flag | Description | Default |
|
|
|
29 |-----------|------|-------------|---------|
|
|
|
30 | Rules Selector | `-rs` | ENGRO2, Recon, or Custom | ENGRO2 |
|
|
|
31 | Input Data | `-in` | Gene expression TSV file | - |
|
|
|
32 | Output RAS | `-ra` | Output RAS scores file | - |
|
|
|
33 | Output Log | `-ol` | Log file | - |
|
|
|
34 | Custom Rules | `-rl` | Custom GPR rules file | - |
|
|
|
35 | Gene Names | `-gn` | Gene ID type | HGNC_Symbol |
|
|
|
36 | Remove Gene | `-rg` | Remove missing genes | true |
|
|
|
37 | Ignore NaN | `--none` | Handle missing gene expression | true |
|
|
542
|
38
|
|
492
|
39 ## Input Format
|
|
|
40
|
|
547
|
41 Gene expression file (TSV):
|
|
|
42
|
|
|
43 ```
|
|
|
44 Gene Sample1 Sample2 Sample3
|
|
|
45 ALDOA 125.5 98.3 142.7
|
|
|
46 ENO1 85.2 110.4 95.8
|
|
|
47 PFKM 200.3 185.6 210.1
|
|
492
|
48 ```
|
|
|
49
|
|
547
|
50 **File Format Notes:**
|
|
|
51 - Use **tab-separated** values (TSV)
|
|
|
52 - First row must contain column headers (Gene, Sample names)
|
|
|
53 - Gene names must match the selected gene ID type
|
|
|
54 - Numeric values only for expression data
|
|
492
|
55
|
|
547
|
56 ## GPR Rules
|
|
492
|
57
|
|
547
|
58 - **AND**: All genes required
|
|
|
59 - **OR**: Any gene sufficient
|
|
|
60 - Example: `(GENE1 and GENE2) or GENE3`
|
|
492
|
61
|
|
547
|
62 ## NaN Handling
|
|
492
|
63
|
|
547
|
64 The `--none` parameter controls how missing gene expression values are treated in GPR rules:
|
|
492
|
65
|
|
547
|
66 **When `--none true` (default):**
|
|
|
67 - `(GENE1 and NaN)` → evaluated as `GENE1` value
|
|
|
68 - `(GENE1 or NaN)` → evaluated as `GENE1` value
|
|
|
69 - Missing genes don't block reaction activity calculation
|
|
492
|
70
|
|
547
|
71 **When `--none false` (strict mode):**
|
|
|
72 - `(GENE1 and NaN)` → `NaN` (reaction cannot be evaluated)
|
|
|
73 - `(GENE1 or NaN)` → `NaN` (reaction cannot be evaluated)
|
|
|
74 - Any missing gene propagates NaN through the entire GPR expression
|
|
492
|
75
|
|
547
|
76 **Recommendation**: Use default (`true`) for datasets with incomplete gene coverage.
|
|
492
|
77
|
|
|
78 ## Output Format
|
|
|
79
|
|
547
|
80 ```
|
|
|
81 Reaction Sample1 Sample2 Sample3
|
|
|
82 R00001 125.5 98.3 142.7
|
|
|
83 R00002 85.2 110.4 95.8
|
|
492
|
84 ```
|
|
|
85
|
|
547
|
86 ## Examples
|
|
492
|
87
|
|
547
|
88 ### Basic Usage
|
|
492
|
89
|
|
|
90 ```bash
|
|
547
|
91 ras_generator -rs ENGRO2 \
|
|
|
92 -in expression.tsv \
|
|
|
93 -ra ras_scores.tsv
|
|
492
|
94 ```
|
|
|
95
|
|
|
96 ## Troubleshooting
|
|
|
97
|
|
547
|
98 | Error | Solution |
|
|
|
99 |-------|----------|
|
|
|
100 | "Gene not found" | Check gene ID format |
|
|
|
101 | "Invalid GPR" | Verify GPR rule syntax |
|
|
492
|
102
|
|
547
|
103 ## See Also
|
|
492
|
104
|
|
547
|
105 - [RAS to Bounds](tools/ras-to-bounds)
|
|
|
106 - [MAREA](tools/marea)
|
|
|
107 - [Built-in Models](reference/built-in-models)
|