Skip to content

low fitness score means organism does not thrive under condition#19

Merged
turbomam merged 9 commits into
mainfrom
claude-code-cli-demo
Sep 17, 2025
Merged

low fitness score means organism does not thrive under condition#19
turbomam merged 9 commits into
mainfrom
claude-code-cli-demo

Conversation

@turbomam

Copy link
Copy Markdown
Member

No description provided.

turbomam and others added 9 commits September 17, 2025 15:26
- Add demo-claude-comprehensive: Full MCP capabilities showcase including gene search, fitness analysis, essential gene identification, network expansion, and biological insights
- Add demo-claude-network: Focused gene-condition network expansion analysis
- Add demo-help: Documentation of all available demo options
- Create structured JSON output prompts for systematic analysis
- Showcase new PairsDataLoader and network analysis functionality

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Update all demo prompts to use simple, natural question format
- Remove complex JSON output requirements to demonstrate natural interaction
- Focus on showcasing MCP's ability to answer biological questions directly

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Change prompt from complex JSON requirements to simple biological question
- Add instruction to analyze fitness data, not just gene annotation
- Now prompts Claude Code to use analyze_gene_fitness tool automatically
- Demonstrates MCP's ability to identify Atu3150 as lactose transporter based on fitness patterns
- Shows strong negative fitness scores for lactose conditions (essential gene)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add limit parameter (default: 10) to prevent massive responses
- Sort results by fitness significance (most negative/positive first)
- Reduces response from 212KB to 6KB (97% reduction)
- Fixes Claude Code token limit issue (39K tokens → 1K tokens)
- Now returns top 10 most significant effects per category
- Enables successful fitness analysis for genes like Atu3150

Before: analyze_gene_fitness failed with "response exceeds 25K token limit"
After: Returns top lactose conditions showing Atu3150 is lactose transporter

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
CRITICAL FIX: Corrected backwards interpretation of fitness scores:
- Negative fitness = gene knockout REDUCES fitness = gene is ESSENTIAL
- Positive fitness = gene knockout IMPROVES fitness = gene INHIBITS growth

Changes:
- Renamed confusing field names for clarity:
  * conditions_where_gene_inhibits_growth → conditions_where_gene_is_essential (negative scores)
  * conditions_where_gene_benefits_growth → conditions_where_gene_inhibits_growth (positive scores)
- Updated comments and docstrings to match correct interpretation
- Fixed parameter descriptions

Impact:
- Atu3150 lactose analysis now correctly shows gene is ESSENTIAL for lactose (not inhibitory)
- Claude Code demos will now provide correct biological conclusions
- Prevents misinterpretation of all gene fitness analyses

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
New meaningful target names:
- demo-atu3150-function: Analyze Atu3150 gene function using fitness data
- demo-biological-analysis: Comprehensive biological gene analysis
- demo-network-expansion: Analyze gene-condition interaction networks

Improvements:
- Self-documenting target names that describe what each demo does
- Enhanced descriptions explaining biological insights
- More descriptive log file names (atu3150-function-analysis.log, etc.)
- Backward compatibility aliases for old names (demo-claude-code, etc.)
- Updated demo-help with clear descriptions of each demo's purpose

Benefits:
- Users immediately understand what each demo demonstrates
- Target names reflect the biological focus rather than just "claude"
- Log file names are more descriptive for analysis and sharing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Updated failing tests to match the corrected fitness interpretation:

Field name changes:
- conditions_where_gene_benefits_growth → conditions_where_gene_is_essential
- beneficial_count → essential_count

Corrected test expectations:
- Positive fitness (0.8) now correctly goes to conditions_where_gene_inhibits_growth
- Negative fitness (-0.8) now correctly goes to conditions_where_gene_is_essential
- Updated test comments to reflect correct biological interpretation

Fixed tests:
- test_analyze_gene_fitness_integration
- test_analyze_gene_fitness
- test_analyze_gene_fitness_categorization
- test_analyze_gene_fitness_with_filters

All 55 tests now pass with the corrected fitness score interpretation.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Added proper type annotations to resolve mypy errors:
- Added Union, List, Tuple imports from typing
- Added type annotations for function parameters and return types
- Fixed variable naming conflict in loop unpacking (value → float_value)
- Added explicit type hint for pairs list: List[Tuple[str, str, float]]

All mypy checks now pass with no errors.
Part of completing make all target requirements.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@turbomam

Copy link
Copy Markdown
Member Author

to be tested after the fact by @realmarcin etc

@turbomam turbomam merged commit 2272857 into main Sep 17, 2025
2 checks passed
@turbomam turbomam deleted the claude-code-cli-demo branch September 17, 2025 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant