BacFighT6: Simulation of T6SS-mediated Bacterial Interactions

Version: 4.3

Developed by: Marek Basler (University of Basel, Biozentrum) with assistance from Gemini 2.5 Pro.

Inspired by:

Reviews on various aspects of the Type VI Secretion System:

1. Overview

This simulation models the dynamic interactions between up to three distinct bacterial cell types—Predators, Prey, and Defenders—within a shared environment. The primary mechanism of interaction is the Type VI Secretion System (T6SS), a sophisticated molecular weapon that bacteria use to inject toxins into neighboring cells upon direct contact.

Cells inhabit a two-dimensional hexagonal grid and compete for space. The simulation progresses in discrete time steps, where each step typically represents one minute of real time. During each step, cells can undergo several actions:

The simulation allows users to configure a vast array of parameters, offering a flexible platform to explore complex ecological dynamics, the evolution of T6SS strategies, and the outcomes of bacterial warfare under different conditions. It is inspired by numerous experimental findings and theoretical models in microbial ecology and T6SS research.

2. Getting Started & User Interface

The simulation interface consists of four main parts:

Basic Workflow:

3. The Simulation Arena

The arena is a hexagonal grid. Each hexagon represents a potential space a single bacterium can occupy.

4. Visualizations

The simulation provides real-time visual feedback:

5. Simulation Controls & Settings Detailed

5.1. Setup Arena (Panel)

5.2. Simulation Control (Panel)

This panel features the main simulation parameters as well as advanced controls for reproducibility.

5.3. Main Control Buttons

5.4. Time-Travel Control (Panel)

5.5. General Settings (Panel)

5.6. Exports (Panel)

5.7. CPRG Reporter Settings

5.8. Cell-Specific Settings (Panel)

This section of the control panel is tabbed for Predator, Prey, and Defender types. Each tab contains parameters unique to that cell's behavior.

6. Cell Types & Detailed Mechanics ("Under the Hood")

Each cell in the simulation is an object with properties tracking its state and behavior.

6.1. General Cell Properties & Processes

Cell Movement

For each of the three cell types (Predator, Prey, Defender), you can define their movement behavior using the following parameters, found in their respective "Cell-Specific Settings" sections under "Movement Behavior":

General Movement Rules:

State Synchronization & Reproducibility

For a simulation to be perfectly reproducible, two conditions must be met:

6.2. Predator Cells

6.3. Prey Cells

6.4. Defender Cells

6.5. Barriers

7. Simulation Loop / Step Logic (runSimulationStep)

Each simulation step (representing one minute) executes the following sequence of events:

8. CPRG Reporter System Details

The CPRG reporter system simulates a common laboratory assay.

9. Preset Scenarios

The "Load Preset Scenario" button provides access to pre-configured parameter sets designed to explore specific phenomena:

Applying a preset will adjust numerous settings across the control panel. You can then further tweak these settings if desired.

10. Data Export & Import

The simulation provides robust options for data management:

Advanced Memory Management

Saving per-step data is memory-intensive. To prevent browser crashes during very long runs, the simulation includes buffer limits for images, arena states, and history, which can be configured in the "Exports & Buffers" panel. The workflow for all buffer types is the same:

10.1 Configuring Simulation via URL Parameters (Advanced)

You can pre-configure many aspects of the "BacFighT6" simulation by adding parameters directly to the browser's URL (the web address displayed in your browser, e.g., bacfight6.html). This is a powerful feature for saving specific setups, sharing them with collaborators, or scripting different starting conditions for experiments.

How it Works:

Available Parameter Types:

Understanding Order and Arena State Interactions:

The sequence of these parameters in your URL dictates the final setup.

Important General Notes for URL Configuration:

11. Technical Notes & Considerations

License and Attribution

This work (BacFighT6: Simulation of T6SS-mediated Bacterial Interactions and its associated code) is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).

Copyright (c) 2025 Marek Basler

You are free to:

The licensor cannot revoke these freedoms as long as you follow the license terms.

Under the following terms:

For the full license text, please visit: https://creativecommons.org/licenses/by/4.0/

Support

Development of BacFighT6 runs on coffee! If you find it useful, please consider a small donation. Thank you!