gsmm-builder
하는 일
스킬은 생물의 대사 모델을 불러오거나 만듭니다. 플럭스 분석을 돌릴 모델이 필요한 연구자를 위한 스킬입니다.
사용하는 경우
- ✓BiGG 데이터베이스의 모델처럼 알려진 대사 모델을 불러오고 싶을 때.
- ✓대사 모델을 처음부터 작게 만들어야 할 때.
- ✓성장 배지를 설정하고 나중 분석을 위해 모델 파일을 저장하고 싶은 경우.
스킬 링크
https://github.com/aiming-lab/AutoResearchClaw/blob/main/external/agents/Biology-Agent/skills/gsmm-builder/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“BiGG에서 iJO1366 E. coli 모델을 불러오고, 포도당 최소 배지로 설정한 뒤 JSON으로 저장해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 큐레이션된 모델 파일을 불러오거나, 대사물질과 반응으로부터 모델을 만듭니다. 그다음 배지 한계와 목적 함수를 설정하고, 모델을 JSON 파일에 씁니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Overview
The gsmm-builder skill constructs or loads genome-scale metabolic models
(GSMMs) in the COBRApy framework. It is the entry point for every metabolic
flux analysis pipeline. Output is a validated COBRApy Model object
serialized to a JSON file ready for downstream FBA and flux analysis.
GSMMs encode every known metabolic reaction in an organism as a stoichiometric matrix. Constraints (reaction bounds, medium composition, objective function) turn the model into a solvable linear program.
Workflow
Step 1 — Decide: Load Existing or Build from Scratch
Option A: Load a curated BIGG model
import cobra
import cobra.io
# Load E. coli iJO1366 from a local SBML file
model = cobra.io.read_sbml_model("iJO1366.xml")
# Or load from a pre-downloaded JSON file
model = cobra.io.load_json_model("iJO1366.json")
print(f"Loaded {model.id}: {len(model.reactions)} reactions, "
f"{len(model.metabolites)} metabolites, {len(model.genes)} genes")
Key BIGG model IDs:
iJO1366— E. coli K-12 MG1655 (2583 reactions)Recon3D— Homo sapiens (13543 reactions)iMM904— S. cerevisiae (1577 reactions)iNJ661— M. tuberculosis (1049 reactions)
Option B: Build a minimal model from scratch
from cobra import Model, Metabolite, Reaction
model = Model("toy_glycolysis")
# Define metabolites with compartments and formula
glc_e = Metabolite("glc__D_e", formula="C6H12O6", name="D-Glucose",
compartment="e")
glc_c = Metabolite("glc__D_c", formula="C6H12O6", name="D-Glucose",
compartment="c")
atp_c = Metabolite("atp_c", formula="C10H12N5O13P3", name="ATP",
compartment="c")
biomass = Metabolite("biomass", formula="", name="Biomass", compartment="c")
# Build reactions
ex_glc = Reaction("EX_glc__D_e")
ex_glc.lower_bound = -10.0 # uptake (negative = import)
ex_glc.upper_bound = 0.0
ex_glc.add_metabolites({glc_e: 1.0})
transport = Reaction("GLCt")
transport.lower_bound = -1000.0
transport.upper_bound = 1000.0
transport.add_metabolites({glc_e: -1.0, glc_c: 1.0})
# Stoichiometry: 1 glucose + ADP -> 2 ATP (simplified glycolysis)
glycolysis = Reaction("GLYCOLYSIS")
glycolysis.lower_bound = 0.0
glycolysis.upper_bound = 1000.0
glycolysis.add_metabolites({glc_c: -1.0, atp_c: 2.0})
biomass_rxn = Reaction("BIOMASS")
biomass_rxn.lower_bound = 0.0
biomass_rxn.upper_bound = 1000.0
biomass_rxn.add_metabolites({atp_c: -10.0, biomass: 1.0})
model.add_reactions([ex_glc, transport, glycolysis, biomass_rxn])
Step 2 — Set the Objective Function
# Set biomass as the optimization target
model.objective = "BIOMASS_Ec_iJO1366_core_53p95M" # reaction ID string
# Verify objective is set
print(model.objective.to_json())
Step 3 — Define the Growth Medium
# M9 minimal medium with glucose (aerobic)
M9_MEDIUM = {
"EX_glc__D_e": -10.0, # glucose uptake, mmol/gDW/h
"EX_o2_e": -20.0, # oxygen (aerobic)
"EX_nh4_e": -1000.0, # ammonium (unlimited)
"EX_pi_e": -1000.0, # phosphate (unlimited)
"EX_so4_e": -1000.0, # sulfate (unlimited)
"EX_h2o_e": -1000.0, # water (unlimited)
"EX_h_e": -1000.0, # protons (unlimited)
}
# Apply medium: close all exchange reactions first, then open selected
medium = model.medium # returns dict of current open exchange lb magnitudes
for rxn_id, lb in M9_MEDIUM.items():
if rxn_id in model.reactions:
model.reactions.get_by_id(rxn_id).lower_bound = lb
# Anaerobic: set O2 uptake to zero
# model.reactions.get_by_id("EX_o2_e").lower_bound = 0.0
Step 4 — Export Model
import cobra.io
cobra.io.save_json_model(model, "output/my_model.json")
cobra.io.write_sbml_model(model, "output/my_model.xml")
print("Model saved.")
Key Conventions
| Convention | Detail |
|---|---|
| Metabolite ID format | <bigg_id>_<compartment> e.g. glc__D_c, atp_m |
| Compartment codes | c cytosol, e extracellular, m mitochondria, n nucleus |
| Exchange reaction prefix | EX_ e.g. EX_glc__D_e |
| Transport reaction prefix | t or species-specific e.g. GLCt, PGI |
| Uptake bound sign | Negative lower bound = import (e.g. lb = -10) |
| Secretion bound sign | Positive upper bound = export (e.g. ub = 1000) |
| Biomass objective | Reaction with ID containing BIOMASS or Growth |
| Aerobic medium | EX_o2_e lb = -20 (mmol/gDW/h) |
| Anaerobic medium | EX_o2_e lb = 0 |
| Default irrevers |
자주 묻는 질문
BiGG란 무엇인가요?
스킬이 불러올 수 있는, 큐레이션된 대사 모델의 데이터베이스입니다.
처음부터 시작할 수 있나요?
네. 스킬은 사용자의 대사물질과 반응으로 작은 모델을 만들 수 있습니다.
배지 설정은 무엇을 하나요?
모델이 흡수할 수 있는 영양분을 제한하므로, 성장 예측이 달라집니다.
상세 정보
작성자의 원본 설명
Build or load a genome-scale metabolic model (GSMM) using COBRApy. Covers loading from BIGG, constructing minimal models from scratch, setting medium constraints, and exporting validated .json model files.
인기도
- GitHub 스타
- 15k
- 순위
- #11055
- 라이선스
- 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을 출력하도록 돕습니다.