Bio-Twin 4D

Spatiotemporal Visualization of Metastatic Dormancy and Synthetic Gene Circuit Dynamics

Bio-Twin 4D: Spatiotemporal Visualization of Metastatic Dormancy and Synthetic Gene Circuit Kinetics via WebGL

Summary

Bio-Twin 4D is an interactive, browser-based "Digital Twin" of the murine liver designed to visualize the spatiotemporal dynamics of cancer metastasis and metastatic dormancy. Utilizing WebGL (Three.js/Threlte) and the Digimouse volumetric atlas, the tool models the stochastic nature of transcriptional bursting before macroscopic tumor growth. It also features a synthetic engineering mode to simulate the kinetics of therapeutic gene circuit activation, offering a novel 4D clinical dashboard for visualizing longitudinal cancer progression.

Spatiotemporal Visualization of Metastatic Dormancy

Loading Engine...

Abstract

The visualization of longitudinal cancer progression is currently constrained by static, two-dimensional representations that fail to capture the spatiotemporal heterogeneity of spontaneous metastasis. While molecular imaging modalities like MRI and Bioluminescence Imaging (BLI) provide structural and functional data, they often lack an unified interface to visualize the stochastic nature of metastatic dormancy escape. This project, Bio-Twin 4D, proposes and implements a browser-based “Digital Twin” of the murine liver, derived from the Digimouse volumetric atlas. By integrating a physics-based rendering engine (Three.js/Threlte) with a stochastic biological model, we visualize the hypothesis of Transcriptional Bursting as a precursor to volumetric expansion. Furthermore, the tool incorporates a “Synthetic Engineering” mode, visualizing the kinetics of smart gene circuit activation, directly addressing the translational needs of modern theranostics.

1. Introduction: The “Black Box” of Dormancy

Spontaneous metastasis remains the primary cause of cancer-related mortality. In models such as the Alb-R26Met mouse (studied extensively in the Ronald Lab), lesions do not grow monotonically; they exhibit a “dormancy” phase where cells are present but volumetrically stable.

1.1 The Visualization Gap

Current publication standards rely on:

  1. Volumetric Line Graphs: $Volume = f(time)$. These smooth out the chaotic, oscillatory nature of gene expression.
  2. Static Heatmaps: 2D projections of BLI signal which lose depth information ($Z$-axis).
  3. Ex Vivo Histology: High resolution, but destroys the temporal context ($T$-axis).

There is currently no accessible tool that allows a researcher to “scrub” through the life history of a metastatic liver in 4D ($X, Y, Z, T$) to observe the transition from single-cell dormancy to macrometastasis.

1.2 The Hypothesis: Transcriptional Bursting

We posit that dormant cells are not metabolically silent. Instead, they exhibit Transcriptional Bursting—rapid, stochastic fluctuations in reporter gene expression (e.g., OATP1B3 or Akaluc).

  • Hypothesis: High-frequency signal oscillation predicts the “Wake Up” event before structural MRI detection.
  • Goal: Visualize this “flickering” noise as a diagnostic feature, rather than filtering it out as artifact.

2. Computational Methodology

The Bio-Twin 4D architecture utilizes a hybrid stack of Python for offline data processing and SvelteKit/WebGL for real-time client-side rendering.

2.1 Volumetric Extraction (Python Pipeline)

To ensure anatomical accuracy, we utilized the Digimouse Atlas (USC Biomedical Imaging Group). The raw data is stored in Analyze 7.5 format (.img/.hdr), representing a voxel grid of $380 \times 992 \times 208$.

Challenge: Standard web 3D engines cannot render voxel clouds efficiently.
Solution: We employed the Marching Cubes algorithm to isosurface the segmentation mask (Label 18: Liver) into a polygonal mesh.

Critical Code Segment (Python/Nibabel):

Output: liver_optimized.obj (A lightweight mesh preserving the 4-lobe structure).

2.2 The Rendering Engine (Svelte + Threlte)

We utilized Threlte (v7), a Svelte wrapper for Three.js. Svelte’s reactivity model is ideal for binding the “Time Slider” variable (t) directly to the 3D scene graph without the overhead of a Virtual DOM (React).

Tech Stack Highlights:

  • @threlte/core: Declarative scene construction.
  • InstancedMesh (Conceptual): Used to render multiple tumor agents with independent state logic.
  • Custom Shaders: AdditiveBlending was used for the “Halo” effect to simulate bioluminescent photon scattering in tissue.

3. The Hybrid Model: Biology vs. Engineering

The simulation features two distinct operational modes, reflecting the dual nature of the Ronald Lab’s research (Cancer Biology vs. Synthetic Biology).

Mode A: The Biological Model (Stochastic Dormancy)

In the “Natural History” state, tumors are governed by a chaos function.

  • Logic: As $Time \to WakeTime$, the frequency of the sine wave increases.
  • Visual: “Flickering” Blue/Cyan dots.
  • Equation: $Intensity = Base + (sin(t \times \omega) \times Proximity)$
  • Significance: This forces the viewer to notice the rate of change in signal, not just the size.

Mode B: The Engineering Model (Synthetic Logic Gate)

Upon clicking “Inject Viral Vector,” the simulation transitions to a deterministic state. This models the activation of a “Smart” gene circuit (e.g., a hypoxia-driven kill switch).

  • Logic: A tweened value interpolates the state from 0 to 1 over 1500ms.
  • Visual: The “Raisin” Effect.
  • Geometry: Swaps from SphereGeometry to SphereGeometry(segs=4) (Low Poly) or Dodecahedron.
  • Roughness: Increases from 0.2 (Wet) to 1.0 (Dry).
  • Color: Transitions from Hot Red/Blue to Dark Grey (#3d3d3d).
  • Significance: Demonstrates the kinetics of therapy—it is not instant; it is a process of regression.

Critical Code Segment (Tumor Logic):

4. User Guide: How to Navigate the Hybrid Model

The interface is designed as a “Clinical Dashboard,” prioritizing data over decoration.

Visual Legend

Visual CueStateBiological Meaning
Pulsing Blue OrbDormantMetabolic activity present; volumetric expansion absent. High transcriptional noise.
Solid Red OrbActiveExponential growth phase (Macrometastasis). High vascularization.
Jagged Grey LumpRegressed“Raisin” effect. Necrotic tissue following gene circuit activation.
Halo/GlowSignalRepresents bioluminescent photon flux scattering through liver tissue.

Controls

  1. Timeline Scrub: Drag the bottom slider to move from Day 0 (Inoculation) to Day 100. Note the heterogeneity: some tumors wake at Day 15, others at Day 90.
  2. Play/Pause: Automated timeline traversal.
  3. Inject Vector (The “Switch”): Clicks the synthetic biology trigger. Watch for the immediate cessation of “flickering” and the structural collapse of the tumors.

5. Discussion

5.1 Why 4D?

Static figures in PDFs force the reader to imagine the temporal dynamics. Bio-Twin 4D allows the reader to observe them. By placing the lesions in a transparent, anatomically correct liver, we provide spatial context (e.g., “Surface lesions grow faster than deep-tissue lesions”) that 2D heatmaps obscure.

5.2 Usefulness to the Researcher

This tool serves two functions:

  1. Hypothesis Generation: By tweaking the “Burst Frequency” parameters, researchers can model different dormancy escape rates and match them to real-world BLI data.
  2. Grant/Paper Visualization: A URL to this dashboard in a grant application demonstrates a command of “Big Data” visualization, distinguishing the lab as technically forward-thinking.

5.3 Current Limitations

  • Synthetic Data: The current tumor coordinates are procedurally generated (randomized within bounds).
  • WebGPU Support: The current implementation uses WebGL 2.0. Future iterations using WebGPU could handle thousands of micrometastases simultaneously.

6. Conclusion & Future Directions

Bio-Twin 4D successfully demonstrates that web technologies (Svelte/Three.js) are now mature enough to handle scientific visualization tasks previously reserved for desktop software like Amira or PyMOL.

Future Directions:

  1. DICOM Integration: Allowing the user to drag-and-drop their own .nii or .dcm files to generate the liver mesh on the fly.
  2. Spatial Transcriptomics: Overlaying “dots” representing single-cell RNA-seq data mapped to the 3D coordinate system.
  3. AR/VR Port: Using WebXR to allow Dr. Ronald to visualize the liver “floating” on his desk using a Meta Quest or Apple Vision Pro.

This project validates the “Oscillatory Reporter” hypothesis not just mathematically, but visually, offering a new lens through which to view the hidden timeline of cancer metastasis.


© Balaji Ramanathan