मुख्य सामग्री पर जाएँ
Skillpedia
एनालिसिस और स्प्रेडशीट15k · #11053

fba-simulator

यह क्या करती है

यह स्किल COBRApy लाइब्रेरी से कोशिका metabolism के constraint-based सिमुलेशन चलाती है। यह उन शोधकर्ताओं के लिए है जो metabolic मॉडलिंग में अनुमानित विकास और flux मान चाहते हैं।

कब इस्तेमाल करें

  • ✓जब आपके पास metabolic मॉडल है और उसकी विकास दर का अनुमान चाहिए।
  • ✓जब आप मॉडल पर जीन या reaction knockouts परखना चाहते हैं।
  • ✓जब आपको flux वितरण CSV फ़ाइलों में निर्यात करने हैं।

Skill का लिंक

https://github.com/aiming-lab/AutoResearchClaw/blob/main/external/agents/Biology-Agent/skills/fba-simulator/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/aiming-lab/AutoResearchClaw/blob/main/external/agents/Biology-Agent/skills/fba-simulator/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरे E. coli मॉडल पर flux balance analysis चलाइए, फिर हर जीन को knock out करके विकास के नतीजे सहेजिए।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट एक सत्यापित मॉडल लोड करता है, वह flux पैटर्न हल करता है जो biomass जैसे उद्देश्य को अधिकतम करे, और knockouts तथा flux variability जैसे रूप चलाता है। हर बदलाव के बाद उसे पलटा जाता है, इसलिए मॉडल बहाल रहता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Overview

The fba-simulator skill executes constraint-based metabolic simulations on a validated COBRApy model. FBA solves a linear program to find the flux distribution that maximizes (or minimizes) the objective function subject to stoichiometric and thermodynamic constraints.

This skill sits between model construction (gsmm-builder) and biological interpretation (flux-analyzer). All simulations are non-destructive: COBRApy context managers restore model state after each perturbation.


Workflow

Step 1 — Load Validated Model

import cobra
import cobra.io
import cobra.flux_analysis
import pandas as pd

model = cobra.io.load_json_model("my_model.json")
print(f"Model: {model.id}  Solver: {model.solver}")

Step 2 — Standard FBA

FBA maximizes the objective (typically biomass) subject to stoichiometric steady-state constraints: S·v = 0, lb ≤ v ≤ ub.

# Run FBA
solution = model.optimize()

print(f"Status          : {solution.status}")
print(f"Growth rate     : {solution.objective_value:.4f} h^-1")
print(f"Glucose uptake  : "
      f"{solution.fluxes['EX_glc__D_e']:.4f} mmol/gDW/h")
print(f"O2 uptake       : "
      f"{solution.fluxes.get('EX_o2_e', 0):.4f} mmol/gDW/h")
print(f"Acetate sec.    : "
      f"{solution.fluxes.get('EX_ac_e', 0):.4f} mmol/gDW/h")

# Save full flux distribution
solution.fluxes.to_csv("fba_fluxes.csv", header=["flux_mmol_gDW_h"])

Step 3 — Parsimonious FBA (pFBA)

pFBA first maximizes growth, then minimizes total absolute flux, producing the most "economical" solution consistent with maximum growth. This avoids biologically unrealistic high-flux split cycles.

pfba_solution = cobra.flux_analysis.pfba(model)

print(f"pFBA growth rate : {pfba_solution.objective_value:.4f} h^-1")
print(f"Total flux norm  : {pfba_solution.fluxes.abs().sum():.2f}")

pfba_solution.fluxes.to_csv("pfba_fluxes.csv", header=["flux_mmol_gDW_h"])

Step 4 — Flux Variability Analysis (FVA)

FVA computes the minimum and maximum flux each reaction can carry while maintaining at least fraction_of_optimum of the maximum growth rate. This reveals which fluxes are uniquely determined vs. flexible.

from cobra.flux_analysis import flux_variability_analysis

# FVA at 90% of maximum growth
fva_result = flux_variability_analysis(
    model,
    fraction_of_optimum=0.90,
    processes=4,          # parallel workers
)

# fva_result is a DataFrame with columns "minimum" and "maximum"
print(fva_result.head(10))

# Identify rigidly constrained reactions (min ≈ max)
TOLERANCE = 1e-6
rigid = fva_result[
    (fva_result["maximum"] - fva_result["minimum"]).abs() < TOLERANCE
]
print(f"\nRigid reactions (min=max): {len(rigid)}")

fva_result.to_csv("fva_result.csv")

Step 5 — Loopless FBA

Standard FBA may route flux through thermodynamically infeasible energy- generating cycles. Loopless FBA enforces thermodynamic feasibility.

loopless_sol = cobra.flux_analysis.loopless_solution(model)

print(f"Loopless growth  : {loopless_sol.objective_value:.4f} h^-1")
loopless_sol.fluxes.to_csv("loopless_fluxes.csv",
                            header=["flux_mmol_gDW_h"])

Step 6 — Gene Knockout Simulations

# Single gene knockout (context manager — model is restored after)
gene_id = "b0720"  # pgi in E. coli iJO1366

with model:
    model.genes.get_by_id(gene_id).knock_out()
    ko_solution = model.optimize()
    print(f"KO {gene_id} growth: {ko_solution.objective_value:.4f} h^-1")

# Batch single gene deletions
from cobra.flux_analysis import single_gene_deletion

deletion_results = single_gene_deletion(model)
# Returns DataFrame: index = frozenset({gene_id}), columns = [growth, status]
deletion_results.to_csv("gene_deletions.csv")

# Essential genes: growth < 5% of wild-type
wt_growth = model.optimize().objective_value
essential = deletion_results[
    deletion_results["growth"] < 0.05 * wt_growth
]
print(f"\nEssential genes: {len(essential)}")
print(essential.head())

Step 7 — Reaction Knockout Simulations

from cobra.flux_analysis import single_reaction_deletion

rxn_deletion_results = single_reaction_deletion(model)
rxn_deletion_results.to_csv("reaction_deletions.csv")

essential_rxns = rxn_deletion_results[
    rxn_deletion_results["growth"] < 0.05 * wt_growth
]
print(f"Essential reactions: {len(essential_rxns)}")

Step 8 — Carbon Source Swapping

CARBON_SOURCES = {
    "glucose":   ("EX_glc_
अक्सर पूछे जाने वाले सवाल

flux वितरण क्या है?

reaction दरों का वह समूह जो कोशिका मॉडल किसी दी गई स्थिति में भविष्यवाणी करता है।

क्या यह मेरा मॉडल बदलता है?

नहीं। स्किल context managers इस्तेमाल करती है जो हर बदलाव के बाद मॉडल बहाल करते हैं।

यह कौन-सी लाइब्रेरी इस्तेमाल करती है?

COBRApy, constraint-based मॉडलिंग के लिए एक Python लाइब्रेरी।

जानकारी

लेखक का मूल विवरण

Run Flux Balance Analysis (FBA) and related constraint-based simulations using COBRApy. Covers standard FBA, parsimonious FBA (pFBA), Flux Variability Analysis (FVA), loopless FBA, gene/reaction knockouts, and carbon source swapping. Outputs flux distributions and CSV files.

repo: aiming-lab/AutoResearchClaw

लोकप्रियता

GitHub स्टार
15k
रैंकिंग में स्थान
#11053
लाइसेंस
MIT
अपडेट की गई
19/8/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

a-evolve

15k

बार-बार चलने पर विफलताओं का निदान करके, दोहराती त्रुटियों से लक्षित स्किल बनाकर, और आगे के लिए सबक दर्ज करके आपके एजेंट को बेहतर बनने में मदद करती है।

AI और एजेंटएजेंट

biology-biopython

15k

Biopython से DNA, RNA और प्रोटीन अनुक्रमों के साथ काम करने में आपके एजेंट की मदद करती है, जिसमें फ़ाइल पार्सिंग, अनुक्रम गणनाएँ, BLAST खोजें और डेटाबेस तक पहुँच शामिल है।

डेटाएनालिसिस और स्प्रेडशीट

chemistry-rdkit

15k

RDKit से SMILES स्ट्रिंग में लिखे अणुओं का विश्लेषण करने में आपके एजेंट की मदद करती है, जिसमें descriptors, fingerprints, समानता और substructure खोज शामिल हैं।

डेटाएनालिसिस और स्प्रेडशीट

hypothesis-formulation

15k

एक अवलोकन को परखने योग्य परिकल्पनाओं में बदलने में आपके एजेंट की मदद करती है, जिनमें प्रतिस्पर्धी व्याख्याएँ और स्पष्ट भविष्यवाणियाँ हों जो उन्हें गलत साबित कर सकें।

लेखन और डॉक्यूमेंटरिसर्च

मिलती-जुलती skills