Bio Systems Biology Model Curation
Validate, gap-fill, and curate genome-scale metabolic models using memote for quality scores and COBRApy for manual curation. Ensure models meet SBML standards and produce biologically meaningful predictions. Use when improving draft models or preparing models for publication.
Unsigned, install at your own risk
UnverifiedThis skill has no cryptographic signature attached. We can't verify the contents match what the publisher intended.
Install this skill
No account required. Pick your tool, or use the command that detects it for you.
Run in your terminal. It detects your AI tool.
npx @skills-hub-ai/cli install openclaw-medical-bio-systems-biology-model-curationManual setup by platform
Claude Code
~/.claude/skills/openclaw-medical-bio-systems-biology-model-curation/SKILL.md
Instructions
Model Curation
Memote Quality Assessment
# Install memote
pip install memote
# Run full quality report
memote report snapshot model.xml --filename report.html
# Quick score
memote run model.xml
# Continuous integration testing
memote run --pytest-args "--tb=short" model.xml
Memote Python API
import memote
import cobra
model = cobra.io.read_sbml_model('model.xml')
# Run all tests
result = memote.suite.api.run(model)
# Get score breakdown
scores = memote.suite.api.snapshot(model)
print(f"Total score: {scores['score']['total_score']:.2%}")
# Detailed test results
for test_name, test_result in scores['tests'].items():
if not test_result['passed']:
print(f"Failed: {test_name}")
Gap-Filling
import cobra
from cobra.flux_analysis import gapfill
model = cobra.io.read_sbml_model('model.xml')
# Load universal reaction database
universal = cobra.io.read_sbml_model('universal_model.xml')
# Find reactions to add for growth
# demand: reaction to optimize (usually biomass exchange)
# iterations: number of alternative solutions
solution = gapfill(model, universal,
demand=model.reactions.BIOMASS,
iterations=5)
# solution contains list of reaction sets to add
for i, rxn_set in enumerate(solution):
print(f'Solution {i+1}: {[r.id for r in rxn_set]}')
# Add first solution
for rxn in solution[0]:
model.add_reactions([rxn])
Identify Dead-End Metabolites
def find_dead_end_metabolites(model):
'''Find metabolites that cannot be produced or consumed
Dead-end metabolites indicate:
- Missing reactions in the network
- Incorrect reaction stoichiometry
- Incomplete pathways
'''
dead_ends = []
for met in model.metabolites:
producing = [r for r in met.reactions if r.get_coefficient(met) > 0]
consuming = [r for r in met.reactions if r.get_coefficient(met) < 0]
if not producing or not consuming:
dead_ends.append({
'metabolite': met.id,
'name': met.name,
'producers': len(producing),
'consumers': len(consuming)
})
return dead_ends
dead_ends = find_dead_end_metabolites(model)
print(f'Found {len(dead_ends)} dead-end metabolites')
Check Mass and Charge Balance
def check_reaction_balance(reaction):
'''Check if reaction is mass and charge balanced
Unbalanced reactions indicate:
- Missing metabolites
- Wrong stoichiometry
- Proton accounting issues
'''
mass_balance = {}
charge_balance = 0
for met, coef in reaction.metabolites.items():
# Check mass
if met.formula:
for element, count in met.elements.items():
mass_balance[element] = mass_balance.get(element, 0) + coef * count
# Check charge
if met.charge is not None:
charge_balance += coef * met.charge
is_balanced = all(abs(v) < 1e-6 for v in mass_balance.values())
is_charge_balanced = abs(charge_balance) < 1e-6
return {
'mass_balanced': is_balanced,
'charge_balanced': is_charge_balanced,
'mass_imbalance': {k: v for k, v in mass_balance.items() if abs(v) > 1e-6}
}
# Check all reactions
unbalanced = []
for rxn in model.reactions:
result = check_reaction_balance(rxn)
if not result['mass_balanced']:
unbalanced.append((rxn.id, result['mass_imbalance']))
Fix Gene-Protein-Reaction Rules
def standardize_gpr(model):
'''Standardize gene-protein-reaction rules
GPR format: (gene1 and gene2) or gene3
- 'and' = protein complex (all genes required)
- 'or' = isozymes (any gene sufficient)
'''
for rxn in model.reactions:
if rxn.gene_reaction_rule:
# Standardize formatting
rule = rxn.gene_reaction_rule
rule = rule.replace(' AND ', ' and ')
rule = rule.replace(' OR ', ' or ')
rxn.gene_reaction_rule = rule
def identify_orphan_reactions(model):
'''Find reactions without gene associations
Orphan reactions may be:
- Spontaneous reactions
- Unannotated genes
- Transport reactions (often orphan)
'''
orphans = [r for r in model.reactions if not r.genes]
# Classify orphans
exchange = [r for r in orphans if r in model.exchanges]
transport = [r for r in orphans if 'transport' in r.name.lower() or 't_' in r.id.lower()]
other = [r for r in orphans if r not in exchange and r not in transport]
return {
'exchange': len(exchange),
'transport': len(transport),
'other': len(other),
'total': len(orphans)
}
Annotation Standards
def add_standard_annotations(model):
'''Add standard database annotations
Required annotations for SBML compliance:
- KEGG IDs for reactions and metabolites
- ChEBI IDs for metabolites
- BiGG IDs if applicable
'''
for met in model.metabolites:
if not hasattr(met, 'annotation'):
met.annotation = {}
# Add SBO term for metabolite
met.annotation['sbo'] = 'SBO:0000247' # Simple chemical
for rxn in model.reactions:
if not hasattr(rxn, 'annotation'):
rxn.annotation = {}
# Add SBO term based on reaction type
if rxn in model.exchanges:
rxn.annotation['sbo'] = 'SBO:0000627' # Exchange
else:
rxn.annotation['sbo'] = 'SBO:0000176' # Biochemical reaction
Related Skills
- systems-biology/metabolic-reconstruction - Generate draft models
- systems-biology/flux-balance-analysis - Test curated models
- pathway-analysis/kegg-pathways - Add KEGG annotations
Security
Reviews (0)
Related skills
Browse all →More from OpenClaw Medical
View source →More Build skills
Browse category →Frequently asked questions about bio-systems-biology-model-curation
What does the bio-systems-biology-model-curation skill do?
Validate, gap-fill, and curate genome-scale metabolic models using memote for quality scores and COBRApy for manual curation. Ensure models meet SBML standards and produce biologically meaningful predictions. Use when improving draft models or preparing models for publication. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the bio-systems-biology-model-curation skill?
Run `npx @skills-hub-ai/cli install openclaw-medical-bio-systems-biology-model-curation` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/openclaw-medical-bio-systems-biology-model-curation/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does bio-systems-biology-model-curation work with?
bio-systems-biology-model-curation runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the bio-systems-biology-model-curation skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use bio-systems-biology-model-curation after installing it?
In Claude Code, type `/openclaw-medical-bio-systems-biology-model-curation` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the bio-systems-biology-model-curation skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.