Skip to content

BioX: Turning Digital Twins into Wet-Lab Wins via Automated Media Optimization

Published:
5 min read

Or: How We Learned to Stop Guessing Fungal Diets and Trust the Simulation Sandbox

TL;DR: Figuring out the perfect nutritional environment (“diet”) to make a specific fungus thrive and produce life-saving medicines or sustainable food is a slow, manual game of trial-and-error. Developed during BioHackathon Edinburgh 2026, BioX is a web-based digital twin platform that automates this entire pipeline. By ingesting raw biological sequences, building metabolic models via CarveMe/COBRApy, and leveraging SMAC3 for automated Bayesian optimization, BioX compresses months of wet-lab experimentation into a fast, desktop simulation.

Fungi are microscopic powerhouses used in modern biotechnology to manufacture everything from vital therapeutics to alternative proteins. However, optimizing the precise nutrient media to maximize their metabolic output is a massive bottleneck. Historically, researchers have spent months running physical, slow, iteration-heavy lab experiments just to find the ideal chemical recipe for a single organism.

Our solution? We built BioX. Instead of forcing scientists to gamble resources on real-world trials, BioX allows them to construct a computational “digital twin” of a fungus’s complete metabolism, tweak virtual food supplies via an interactive dashboard, and run high-throughput optimization algorithms offline to discover the ultimate growth conditions.


From Raw Sequence to Interactive Simulation

Going from a raw genetic profile to a working metabolic simulation usually requires deep bioinformatics expertise and an array of fractured command-line utilities. The BioX architecture unifies this workflow into a cohesive pipeline split across a scientific backend and a modern web interface.

# Conceptual execution flow of the BioX metabolic simulation backend
def run_fungal_simulation(genome_data_path, nutrient_constraints):
    # 1. Automatically reconstruct the genome-scale metabolic model
    metabolic_model = carveme.reconstruct(genome_data_path)
    
    # 2. Apply user-defined or SMAC3-optimized nutrient boundaries
    bounded_model = apply_media_constraints(metabolic_model, nutrient_constraints)
    
    # 3. Simulate growth rates and metabolic fluxes using Flux Balance Analysis (FBA)
    simulation_results = cobrapy.flux_balance_analysis(bounded_model)
    
    return {
        "growth_rate": simulation_results.objective_value,
        "flux_map": simulation_results.fluxes.to_dict()
    }

By abstracting CarveMe (for model reconstruction) and COBRApy (for flux balance constraints) behind a clean FastAPI layer, the system translates mathematical biological concepts—like byproduct burdens and nutrient exchanges—into real-time data visualizations.


The Tech Stack Architecture

The platform was built from the ground up during the hackathon sprint to bridge the gap between technical, command-line scientific software and accessible web design.

LayerTechnologies UsedPrimary Function
Frontend UIVue 3, Vite 6Provides slider-based parameter controls and data upload screens.
Backend APIPython, FastAPI, Pydantic, UvicornOrchestrates file validation and coordinates the simulation jobs.
Bio-SimulationCarveMe, COBRApy, GLPK SolverBuilds genome-scale metabolic networks and calculates growth rates.
OptimizationSMAC3, ConfigSpaceRuns Bayesian optimization algorithms over multi-dimensional diet spaces.

The Core Features

1. The Interactive Digital Twin Sandbox

Through a smooth, single-page application built with Vue 3 and Vite 6, users can upload genetic data and adjust specific nutrient thresholds using simple web sliders. The interface provides instantaneous predictions on how the virtual organism will react to changes in its diet.

2. Hyperparameter Optimization via SMAC3

Instead of manually guessing parameter bounds, BioX utilizes SMAC3 (Sequential Model-Based Algorithm Configuration) to automate the search for perfect nutrient combinations. SMAC3 navigates highly complex, non-linear biological landscapes offline, identifying highly optimized media formulations that humans would likely miss.

On the Horizon: While the core optimization engine currently runs offline and feeds placeholder data back to the UI, the architecture is engineered to deploy live, interactive diet suggestions directly through the portal next.


Overcoming Hackathon Hurdles

Building a functional bio-simulation tool in a weekend comes with distinct engineering challenges:

What’s Next for BioX

The prototype proved that automating the digital twin pipeline is achievable under tight deadlines. Moving forward, the team is focused on three key milestones:

  1. Live Optimization Integration: Connecting the offline SMAC3 script blocks directly to the live frontend API for instantaneous, automated recipe generation.
  2. Activating the LLM Engine: Unlocking the built-in (but currently dormant) ChatGPT and Gemini layers to explain highly complex metabolic findings, network bottlenecks, and flux paths in plain English.
  3. One-Click Deployment: Packaging the entire stack into a singular Docker container so academic and industrial laboratories can clone and launch BioX locally with no environmental friction.

With platforms like BioX, the future of biotechnology isn’t just automated—it’s simulated. By shifting the initial trial-and-error phase out of the physical wet-lab and into an algorithmic sandbox, we can discover smarter, cleaner biological solutions faster than ever before.

Learn More About the Bio-Innovation Series

Watch this brief overview of sustainable biotech hackathons to see how teams utilize rapid prototyping ecosystems to turn academic code into functional tools:

This video highlights the broader ecosystem of hackathons, illustrating how students, developers, and researchers come together to tackle pressing real-world data challenges, just like our team did with fungal metabolic optimization at Edinburgh.

New posts, shipping stories, and nerdy links straight to your inbox.

2× per month, pure signal, zero fluff.


Edit on GitHub