gsmm-validator
यह क्या करती है
यह स्किल metabolic मॉडल को उन त्रुटियों के लिए जाँचती है जो उसके नतीजों को बेकार कर सकती हैं। यह उन शोधकर्ताओं के लिए है जो सिमुलेशन चलाने से पहले गुणवत्ता जाँच चाहते हैं।
कब इस्तेमाल करें
- ✓जब आपने metabolic मॉडल बनाया या संपादित किया है और उसकी जाँच चाहते हैं।
- ✓जब सिमुलेशन नतीजे अजीब लगें और आपको मॉडल पर शक हो।
- ✓जब आपको त्रुटियों और चेतावनियों की सूची वाली validation रिपोर्ट चाहिए।
Skill का लिंक
https://github.com/aiming-lab/AutoResearchClaw/blob/main/external/agents/Biology-Agent/skills/gsmm-validator/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे metabolic मॉडल को सत्यापित कीजिए और असंतुलित reactions या dead-end metabolites की रिपोर्ट दीजिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट मॉडल लोड करता है और छह क्षेत्र जाँचता है, जिनमें mass और charge balance, विकास की संभावना, dead-end metabolites, stoichiometric सुसंगति, thermodynamic loops और gene rule फ़ॉर्मेट शामिल हैं। फिर वह त्रुटियों और चेतावनियों वाली रिपोर्ट लिखता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Overview
The gsmm-validator skill performs rigorous quality control on a COBRApy
Model before it enters any flux analysis pipeline. An invalid model
silently produces biologically meaningless fluxes; validation catches
structural errors early.
Validation covers six categories: (1) mass/charge balance, (2) feasibility and biomass production, (3) dead-end metabolites, (4) stoichiometric consistency, (5) thermodynamic loop detection, and (6) GPR rule integrity.
Workflow
Step 1 — Load the Model
import cobra
import cobra.io
model = cobra.io.load_json_model("my_model.json")
print(f"Loaded: {model.id} ({len(model.reactions)} reactions)")
Step 2 — Mass and Charge Balance Check
Unbalanced reactions are among the most common modelling errors. COBRApy computes elemental balance per reaction.
errors = []
warnings = []
print("=== Mass/Charge Balance ===")
for rxn in model.reactions:
# Returns dict like {"C": -1, "H": 2} if imbalanced; empty dict if OK
imbalance = rxn.check_mass_balance()
if imbalance:
# Exchange and demand reactions are expected to be imbalanced
if rxn.id.startswith(("EX_", "DM_", "SK_", "BIOMASS")):
warnings.append(f"WARN [{rxn.id}] boundary reaction imbalanced "
f"(expected): {imbalance}")
else:
errors.append(f"ERROR [{rxn.id}] mass/charge imbalance: "
f"{imbalance}")
for msg in errors + warnings:
print(msg)
print(f" {len(errors)} error(s), {len(warnings)} warning(s)")
Step 3 — Biomass Producibility (FBA Feasibility)
print("\n=== Biomass Producibility ===")
solution = model.optimize()
if solution.status != "optimal":
errors.append(f"ERROR Model is {solution.status} — "
f"cannot produce biomass under current medium.")
print(f" FAIL: {solution.status}")
elif solution.objective_value < 1e-6:
errors.append("ERROR Growth rate is effectively zero "
"(< 1e-6 h^-1). Check medium and objective reaction.")
print(f" FAIL: growth = {solution.objective_value:.6f} h^-1")
else:
print(f" PASS: growth = {solution.objective_value:.4f} h^-1")
Step 4 — Dead-End Metabolite Detection
A metabolite is a dead-end if it is produced by at least one reaction but consumed by none, or vice versa. Dead-ends create infeasibility in network regions.
from cobra.manipulation import find_blocked_reactions
print("\n=== Dead-End Metabolites ===")
dead_end_mets = []
for met in model.metabolites:
producers = [r for r in met.reactions
if r.get_coefficient(met) > 0]
consumers = [r for r in met.reactions
if r.get_coefficient(met) < 0]
if producers and not consumers:
dead_end_mets.append((met.id, "produced but never consumed"))
elif consumers and not producers:
dead_end_mets.append((met.id, "consumed but never produced"))
if dead_end_mets:
for met_id, reason in dead_end_mets:
warnings.append(f"WARN [{met_id}] dead-end: {reason}")
print(f" {len(dead_end_mets)} dead-end metabolite(s) found")
else:
print(" PASS: no dead-end metabolites")
for msg in warnings[-len(dead_end_mets):]:
print(f" {msg}")
Step 5 — Blocked Reaction Detection
from cobra.flux_analysis import find_blocked_reactions
print("\n=== Blocked Reactions ===")
blocked = find_blocked_reactions(model, open_exchanges=True)
if blocked:
warnings.append(f"WARN {len(blocked)} blocked reaction(s): "
f"{blocked[:5]} ...")
print(f" {len(blocked)} blocked reactions (cannot carry flux)")
else:
print(" PASS: no blocked reactions")
Step 6 — Thermodynamic Loop Detection (Loopless FBA)
Energy-generating cycles violate thermodynamics and inflate apparent fluxes.
print("\n=== Thermodynamic Loops ===")
try:
loopless_solution = cobra.flux_analysis.loopless_solution(model)
standard_solution = model.optimize()
# Compare objective values; large discrepancy suggests loop inflation
delta = abs(loopless_solution.objective_value
- standard_solution.objective_value)
if delta > 0.01:
warnings.append(
f"WARN Loop detected: standard FBA growth "
f"{standard_solution.objective_value:.4f} vs loopless "
f"{loopless_solution.objective_value:.4f} (delta={delta:.4f})"
)
print(f" WARN: po
अक्सर पूछे जाने वाले सवाल
क्या सभी reactions संतुलित होने चाहिए?
नहीं। exchange और demand reactions असंतुलित होने की उम्मीद होती है, इसलिए रिपोर्ट उन्हें चेतावनी के रूप में चिह्नित करती है।
dead-end metabolite क्या है?
वह यौगिक जो बनता है पर कभी इस्तेमाल नहीं होता, या इस्तेमाल होता है पर कभी बनता नहीं, और जो मॉडल के हिस्से रोक सकता है।
विश्लेषण से पहले क्यों जाँचें?
गलत मॉडल बिना किसी दिखने वाली त्रुटि के बेकार flux मान दे सकता है।
जानकारी
लेखक का मूल विवरण
Validate a COBRApy genome-scale metabolic model for mass/charge balance, stoichiometric consistency, biomass producibility, dead-end metabolites, thermodynamic loops, and GPR rule formatting. Outputs a structured validation report with errors and warnings.
लोकप्रियता
- GitHub स्टार
- 15k
- रैंकिंग में स्थान
- #11056
- लाइसेंस
- MIT
- अपडेट की गई
- 19/8/2026
कमेंट
- …
इस repository की और skills
a-evolve
15kबार-बार चलने पर विफलताओं का निदान करके, दोहराती त्रुटियों से लक्षित स्किल बनाकर, और आगे के लिए सबक दर्ज करके आपके एजेंट को बेहतर बनने में मदद करती है।
biology-biopython
15kBiopython से DNA, RNA और प्रोटीन अनुक्रमों के साथ काम करने में आपके एजेंट की मदद करती है, जिसमें फ़ाइल पार्सिंग, अनुक्रम गणनाएँ, BLAST खोजें और डेटाबेस तक पहुँच शामिल है।
chemistry-rdkit
15kRDKit से SMILES स्ट्रिंग में लिखे अणुओं का विश्लेषण करने में आपके एजेंट की मदद करती है, जिसमें descriptors, fingerprints, समानता और substructure खोज शामिल हैं।
hypothesis-formulation
15kएक अवलोकन को परखने योग्य परिकल्पनाओं में बदलने में आपके एजेंट की मदद करती है, जिनमें प्रतिस्पर्धी व्याख्याएँ और स्पष्ट भविष्यवाणियाँ हों जो उन्हें गलत साबित कर सकें।
मिलती-जुलती skills
gitcrawl
394kयह आपके एजेंट को GitHub issues और pull requests के सेव आर्काइव में खोजने, मिलते-जुलते मामलों को समूह में रखने और लाइव स्थिति जांचने देती है।
slacrawl
394kयह आपके एजेंट को स्थानीय Slack आर्काइव में संदेश खोजने और गिनने, उसकी ताज़गी जांचने और ज़रूरत पड़ने पर उसे ताज़ा करने देती है।
goplaces
394kयह आपके एजेंट को Google Places से जगहें खोजने, उनका विवरण और समीक्षाएं पाने, और जगह के नाम हल करने में मदद करती है, स्क्रिप्ट के लिए JSON आउटपुट के साथ।