Commit 65c7401
Fix build_reaction_expression to support direct gene ID matching
Fixed issue where reaction expression values were blank when converting
from gene-level to reaction-level expression.
The problem occurred when expression data was loaded without a genome
or when model gene IDs didn't match genome feature IDs. The original
code only searched through the genome object, failing to find genes
with different ID formats (e.g., model has ACIAD#### but expression
has ACIAD_RS#####).
Changes:
- First attempt direct lookup in self.features by gene ID
- Fall back to genome search (which supports aliases) if direct lookup fails
- This allows matching when gene IDs are identical, even without a genome
- Maintains backward compatibility with genome-based alias resolution
Fixes blank reaction expression values in genome-to-model conversion.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 9ffac0e commit 65c7401
1 file changed
+26
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
497 | 497 | | |
498 | 498 | | |
499 | 499 | | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
509 | 504 | | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
510 | 517 | | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
519 | 528 | | |
520 | 529 | | |
521 | 530 | | |
| |||
0 commit comments