A friendly toolkit to help researchers simulate fluorescence microscopy images, no coding required.
VLab4Mic lets you explore, test, and validate imaging experiments before stepping into the microscope room.
Whether you are new to Python or an experienced bioimage researcher, VLab4Mic provides a safe sandbox to:
- Build virtual samples from PDB/CIF structures
- Apply direct or indirect fluorescent labeling
- Introduce Structural integrity, crowding, and structural variation
- Simulate image acquisition across modalities
- Run parameter sweeps to explore experimental conditions
- Compare noiseless vs. realistic acquisitions
This README is written to be friendly for beginners while maintaining the technical depth experienced users expect.
- New microscopy users: to gain intuitive understanding without coding
- Researchers designing experiments: testing probes, PSFs, exposure times
- Microscopy experts: benchmarking reconstruction methods or PSFs
| Option | Skills Needed | Best For |
|---|---|---|
| 1. Google Colab | None | Beginners, teaching, quick experiments |
| 2. Local Jupyter Notebooks | Basic installation | Smooth widget-based use |
| 3. Python Scripts | Comfortable with code | Full flexibility & automation |
The easiest way to start.
β No installation
β No configuration
β Works in browser
β Always up to date
| Category | Description | Notebook | Colab |
|---|---|---|---|
| Main Interface | Create virtual samples & simulate imaging | Notebook | Open in Colab |
| Parameter Sweeps | Configure & run simulation sweeps | Notebook | Open in Colab |
| Tutorial | Video |
|---|---|
| Tutorial 1 | ![]() |
| Tutorial 2 | ![]() |
| Tutorial 3 | ![]() |
- Click the Jupyter badge (opens the raw notebook)
- Download the
.ipynbfile - Open Google Colab β File β Upload notebook
We recommend using Python's built-in venv. Conda or a similar environment
manager can also be used if you prefer.
Run the following command to create a local .venv environment:
python3 -m venv .venvThen activate it:
source .venv/bin/activatepip install vlab4mic "vlab4micjupyter[local]"VLab4Mic downloads required PDB/CIF structure files on first use and stores them
in your user folder at ~/.vlab4mic/structures. To use a different location,
set VLAB4MIC_STRUCTURE_DIR before running VLab4Mic.
jupyter labFrom:
https://github.com/HenriquesLab/VLab4Mic/tree/main/notebooks
Example script:
from vlab4mic.experiments import image_vsample
import matplotlib.pyplot as plt
modalities = ["Widefield", "Confocal", "STED"]
images, noiseless, experiment = image_vsample(
structure="7R5K",
probe_template="Antibody",
probe_target_type="Sequence",
probe_target_value="ELAVGSL",
multimodal=modalities,
number_of_particles=10,
run_simulation=True,
)
fig, axs = plt.subplots(1, len(modalities))
for i, mod in enumerate(modalities):
axs[i].imshow(images[mod][0], cmap="magma")
axs[i].set_title(mod)
plt.show()For more examples see /examples.
- Website: https://vlab4mic.henriqueslab.org/
- Full Manual: https://github.com/HenriquesLab/VLab4Mic/blob/main/manual.md
- Wiki Tutorials: https://github.com/HenriquesLab/VLab4Mic/wiki
Jupyter won't open β Environment not activated.
ImportError β Install VLab4Mic inside the active environment.
Colab won't load β Upload notebook manually.
If issues persist, open an issue!
Contributions welcome!
See: https://github.com/HenriquesLab/VLab4Mic/blob/main/CONTRIBUTING.md




