flux-analyzer
यह क्या करती है
यह स्किल flux सिमुलेशन के आउटपुट की व्याख्या करती है और पढ़ने योग्य नतीजे व चित्र बनाती है। यह उन शोधकर्ताओं के लिए है जिन्हें बताना है कि सिमुलेशन की संख्याओं का मतलब क्या है।
कब इस्तेमाल करें
- ✓जब आपके पास flux नतीजे हैं और आप जानना चाहते हैं कि कौन-से जीन आवश्यक हैं।
- ✓जब आपको phase plane plots या flux sampling सार चाहिए।
- ✓जब आपको पेपर के लिए pathway स्तर या उत्पाद स्रावण का सार चाहिए।
Skill का लिंक
https://github.com/aiming-lab/AutoResearchClaw/blob/main/external/agents/Biology-Agent/skills/flux-analyzer/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे मॉडल में आवश्यक जीन खोजिए और ऑक्सीजन बनाम ग्लूकोज़ का phase plane बनाइए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट मॉडल और flux नतीजे लोड करता है, हर जीन को बारी-बारी हटाकर देखता है कि विकास कैसे बदलता है, जिन जीनों से विकास तय सीमा से नीचे गिरता है उन्हें चिह्नित करता है, और चित्र व सारांश तालिकाएँ बनाता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Overview
The flux-analyzer skill transforms raw FBA output into actionable biological
knowledge. It operates on FBA result files and the COBRApy model to produce
gene essentiality maps, phenotypic phase planes (PPP), flux sampling
distributions, pathway-level summaries, and product secretion profiles.
This skill is the metabolic-modelling analogue of event reconstruction and phenomenology summary stage in the ColliderAgent pipeline: it turns numbers into biology.
Workflow
Step 1 — Load Model and FBA Results
import cobra
import cobra.io
import cobra.flux_analysis
import cobra.sampling
import pandas as pd
import numpy as np
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
model = cobra.io.load_json_model("my_model.json")
fba_fluxes = pd.read_csv("fba_fluxes.csv", index_col=0)["flux_mmol_gDW_h"]
wt_growth = model.optimize().objective_value
print(f"Wild-type growth: {wt_growth:.4f} h^-1")
Step 2 — Gene Essentiality Analysis
Essential genes are those whose deletion reduces growth to below 5% of wild-type — a widely used lethality criterion.
from cobra.flux_analysis import single_gene_deletion, double_gene_deletion
# --- Single gene essentiality ---
sg_deletion = single_gene_deletion(model)
sg_deletion.columns = ["growth", "status"]
sg_deletion["is_essential"] = sg_deletion["growth"] < 0.05 * wt_growth
sg_deletion["growth_fraction"] = sg_deletion["growth"] / wt_growth
essential_genes = sg_deletion[sg_deletion["is_essential"]]
print(f"Essential genes: {len(essential_genes)} / {len(model.genes)}")
sg_deletion.to_csv("gene_essentiality.csv")
# --- Double gene essentiality (synthetic lethality) ---
# Limit to a focused gene set to reduce compute time
target_genes = list(model.genes)[:50] # adjust as needed
dg_deletion = double_gene_deletion(model, target_genes, target_genes)
dg_deletion.columns = ["growth", "status"]
dg_deletion["is_synthetic_lethal"] = dg_deletion["growth"] < 0.05 * wt_growth
dg_deletion.to_csv("double_gene_essentiality.csv")
Step 3 — Reaction Essentiality Analysis
from cobra.flux_analysis import single_reaction_deletion
sr_deletion = single_reaction_deletion(model)
sr_deletion.columns = ["growth", "status"]
sr_deletion["is_essential"] = sr_deletion["growth"] < 0.05 * wt_growth
essential_rxns = sr_deletion[sr_deletion["is_essential"]]
print(f"Essential reactions: {len(essential_rxns)} / {len(model.reactions)}")
sr_deletion.to_csv("reaction_essentiality.csv")
Step 4 — Phenotypic Phase Plane (PPP)
The PPP maps growth rate over a 2D grid of two nutrient uptake rates, revealing metabolic phase transitions (aerobic growth, mixed-acid fermentation, etc.).
from cobra.flux_analysis import production_envelope
# Phase plane: glucose uptake vs. oxygen uptake
ppp = production_envelope(
model,
["EX_glc__D_e", "EX_o2_e"], # x and y axes
objective=model.reactions.get_by_id("BIOMASS_Ec_iJO1366_core_53p95M"),
points=20,
)
print(ppp.head())
# Plot heatmap
fig, ax = plt.subplots(figsize=(8, 6))
pivot = ppp.pivot_table(
index="EX_o2_e", columns="EX_glc__D_e", values="flux_maximum"
)
im = ax.imshow(pivot.values, aspect="auto", origin="lower",
cmap="viridis",
extent=[ppp["EX_glc__D_e"].min(), ppp["EX_glc__D_e"].max(),
ppp["EX_o2_e"].min(), ppp["EX_o2_e"].max()])
plt.colorbar(im, ax=ax, label="Growth rate (h$^{-1}$)")
ax.set_xlabel("Glucose uptake (mmol/gDW/h)")
ax.set_ylabel("O$_2$ uptake (mmol/gDW/h)")
ax.set_title("Phenotypic Phase Plane")
fig.tight_layout()
fig.savefig("phenotypic_phase_plane.pdf", dpi=300)
fig.savefig("phenotypic_phase_plane.png", dpi=150)
plt.close(fig)
print("PPP saved to phenotypic_phase_plane.pdf")
Step 5 — Flux Sampling
Flux sampling explores the full space of feasible steady-state flux distributions, revealing which reactions have wide vs. narrow feasible ranges.
# OptGP sampler: Markov-chain Monte Carlo in flux cone
samples = cobra.sampling.sample(model, n=1000, method="optgp",
thinning=100, processes=4)
# samples is a DataFrame: rows = samples, columns = reaction IDs
samples.to_csv("flux_samples.csv", index=False)
# Violin plot for key central metabolism reactions
KEY_REACTIONS = ["PFK", "PGI", "PDH", "CS", "AKGDH",
"EX_glc__D_e", "EX_ac_e", "EX_co2_e"]
key_data = samples[[r for r in KEY_REACTIONS if r in samples.columns]]
fig, ax
अक्सर पूछे जाने वाले सवाल
वह तय कैसे करता है कि कोई जीन आवश्यक है?
जब उसे हटाने से विकास wild-type विकास दर के 5 प्रतिशत से नीचे गिरे, तो उसे आवश्यक माना जाता है।
phase plane क्या है?
वह plot जो दिखाता है कि दो इनपुट बदलने पर अधिकतम संभव विकास कैसे बदलता है।
चित्रों के लिए कौन-से टूल इस्तेमाल होते हैं?
matplotlib, जो बिना display के चित्र सहेजने के लिए सेट है।
जानकारी
लेखक का मूल विवरण
Analyse FBA flux distributions to extract biological insights. Covers gene essentiality, phenotypic phase planes, flux sampling, pathway-level aggregation, secretion product prediction, and production of publication- quality figures.
लोकप्रियता
- GitHub स्टार
- 15k
- रैंकिंग में स्थान
- #11054
- लाइसेंस
- 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 आउटपुट के साथ।