gsmm-validator
하는 일
스킬은 결과를 무의미하게 만들 수 있는 오류를 대사 모델에서 검사합니다. 시뮬레이션 전에 품질 검사를 원하는 연구자를 위한 스킬입니다.
사용하는 경우
- ✓대사 모델을 만들거나 편집했고, 검사를 받고 싶을 때.
- ✓시뮬레이션 결과가 이상해 모델을 의심하는 경우.
- ✓오류와 경고를 나열한 검증 보고서가 필요할 때.
스킬 링크
https://github.com/aiming-lab/AutoResearchClaw/blob/main/external/agents/Biology-Agent/skills/gsmm-validator/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“대사 모델을 검증하고, 균형이 맞지 않는 반응과 막다른 대사물질을 담은 보고서를 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 모델을 불러와 여섯 영역을 검사합니다. 질량과 전하 균형, 성장 실현 가능성, 막다른 대사물질, 화학량론적 일관성, 열역학적 순환, 유전자 규칙의 형식입니다. 그다음 오류와 경고가 담긴 보고서를 씁니다.
기술 내용 (원본 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
자주 묻는 질문
모든 반응이 균형을 이뤄야 하나요?
아닙니다. 교환 반응과 수요 반응은 균형이 맞지 않는 것이 정상이므로, 보고서는 이를 경고로 표시합니다.
막다른 대사물질이란 무엇인가요?
생성되기만 하고 쓰이지 않거나, 쓰이기만 하고 생성되지 않아 모델의 일부를 막을 수 있는 화합물입니다.
분석 전에 검증하는 이유는?
잘못된 모델은 눈에 보이는 오류 없이도 무의미한 플럭스 값을 만들 수 있기 때문입니다.
상세 정보
작성자의 원본 설명
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
- 업데이트
- 2026. 8. 19.
댓글
- …
이 저장소의 다른 스킬
a-evolve
15k반복 실행에 걸쳐 실패를 진단하고, 오류 패턴에서 맞춤 스킬을 만들고, 나중에 쓸 교훈을 기록해 에이전트가 나아지도록 돕습니다.
biology-biopython
15kBiopython으로 DNA, RNA, 단백질 서열을 다루도록 에이전트를 돕습니다. 파일 파싱, 서열 계산, BLAST 검색, 데이터베이스 접근을 포함합니다.
chemistry-rdkit
15kRDKit으로 SMILES 문자열로 된 분자를 분석하도록 에이전트를 돕습니다. 기술자, 지문, 유사도, 부분 구조 검색을 포함합니다.
hypothesis-formulation
15k관찰 내용을 검증 가능한 가설로 바꾸도록 에이전트를 돕습니다. 경쟁하는 설명과, 가설이 틀렸음을 보여 줄 수 있는 명확한 예측을 포함합니다.
비슷한 스킬
gitcrawl
394k에이전트가 저장된 GitHub 이슈와 풀 리퀘스트 보관본을 검색하고, 중복 항목을 묶고, GitHub에서 현재 상태를 확인하도록 돕습니다.
slacrawl
394k에이전트가 로컬 Slack 보관본에서 메시지를 검색하고 개수를 세며, 보관본이 얼마나 최신인지 확인하고 필요할 때 새로 고치도록 돕습니다.
goplaces
394k에이전트가 Google Places로 장소를 검색하고, 세부 정보와 리뷰를 가져오고, 장소 이름을 확인하며, 스크립트용 JSON을 출력하도록 돕습니다.