Examples
Ready-to-run example scripts demonstrating common VLab4Mic workflows. Before running, make sure you have installed VLab4Mic.
Run any script with:
Available Scripts
| Category |
Description |
Script |
| Image virtual sample |
Create a virtual sample and simulate its imaging acquisition |
 |
| Parameter sweep |
Set up and run a parameter sweep analysis |
 |
| Real vs Simulation |
Create a simulated image based on a real experimental image |
 |
| Custom structure |
Image a virtual sample using a custom local PDB/CIF file |
 |
Article Figure Scripts
Scripts used to generate the figures in the VLab4Mic publication. Each script is self-contained and demonstrates a specific feature or validation scenario.
| Figure |
Description |
Script |
| Fig. 1 |
HIV capsid (3J3Y) imaged across all modalities |
 |
| Fig. 2 |
NPC (7R5K) panel with SMLM and quantification |
 |
| Fig. 3 (A–C) |
Parameter sweep panels for structural comparison |
 |
| Fig. 3 (D–E) |
Parameter sweep with labelling efficiency |
 |
| Fig. 4 |
Clathrin-coated structure (CCS) imaging |
 |
| Fig. S — AlphaFold |
Using a locally downloaded AlphaFold model as input structure |
 |
| Fig. S — Depth of field |
Effect of depth-of-field parameter on simulated images |
 |
| Fig. S — Image positioning |
Using a reference image to position epitopes in the virtual sample |
 |
| Fig. S — Labelling efficiency & hindrance |
Labelling efficiency and steric hindrance effects |
 |
| Fig. S — SMLM localisation (CCS) |
Localisation table simulation for clathrin-coated structures |
 |
| Fig. S — Multicolour |
Two-colour imaging of the same structure with different probes |
 |
| Fig. S — Multiple structures |
Imaging multiple different structures in the same field of view |
 |
| Fig. S — NPC quantification |
NPC ring quantification simulation |
 |
| Fig. S — Primary & secondary |
Indirect labelling with primary and secondary antibody models |
 |
| Fig. S — Probe examples |
Gallery of all probe templates across different structures |
 |
| Fig. S — Site-specific labelling |
Site-specific probe conjugation on a defined residue |
 |
| Fig. S — Structural integrity |
Structural integrity parameter effects on NPC and capsid |
 |
| Fig. S — Structure normals |
Structure normal directions and probe positioning |
 |
| Fig. S — Structure parsing |
Structure parsing, asymmetric units, and multiple targets |
 |
Image Virtual Sample
Demonstrates the core image_vsample function. In this example, 10 Nuclear Pore Complexes (NPC, model 7R5K) are labelled at the C-terminal of Nup96 and imaged across multiple modalities.
Key things shown:
- Selecting a structural model from PDB
- Using a pre-configured probe template
- Simulating acquisition across Widefield, Confocal, STED, and SMLM
View script on GitHub →
Parameter Sweep
Demonstrates run_parameter_sweep. In this example, labelling efficiency and structural integrity are swept across 3 values each (9 combinations total), and each output is compared against a reference image via Pearson correlation.
Key things shown:
- Configuring sweep parameters as lists or ranges
- Running repeated simulations
- Generating heatmap analysis outputs
View script on GitHub →
Real vs Simulation
Shows how to base a simulated image on the parameters estimated from a real experimental acquisition — useful for validation and benchmarking.
View script on GitHub →
Custom Structure
Shows how to load and use a local PDB or CIF file as the structural model, instead of downloading from the PDB database.
View script on GitHub →