Skip to content

VLab4Mic in napari and Fiji, template 0.1.19, and this repository as the app's home - #6

Merged
brunomsaraiva merged 50 commits into
HenriquesLab:mainfrom
CellMigrationLab:claude/festive-cannon-epptr4
Oct 28, 2026
Merged

brunomsaraiva merged 50 commits into
HenriquesLab:mainfrom
CellMigrationLab:claude/festive-cannon-epptr4

Conversation

@guijacquemet

@guijacquemet guijacquemet commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Brings the work done in the CellMigrationLab fork since June back to this repository, and makes this repository the home of the VLab4Mic app (installers, App Centre listing, update checks). It is 50 commits ahead of main and 0 behind, so it merges without conflicts.

What it adds

VLab4Mic in napari and Fiji (experimental, through the LabConstrictor-Tools bridge)

  • Two tools: Simulate imaging of a virtual sample (simulate_sample) and Compare an image with a reference (compare_images, SSIM and Pearson), declared in src/vlab4mic_lc_tools.
  • The forms match the notebook's controls (particles, labelling efficiency, wobble, structural integrity, structure file, orientation angles); each new simulation replaces the previous simulated and noiseless images.
  • Clear refusals instead of raw errors: an exposure that would need more memory than allowed, a probe that does not fit the structure, a flat or all-zero image (simulated or reference), a structure file that is not .cif/.pdb or does not exist.
  • Tests: tests/test_lc_tools_declaration.py and the app's own lc_tests cases, run by .github/workflows/tests.yml on every pull request.

Template and packaging

  • LabConstrictor template synced from 0.1.3 to 0.1.19.
  • vlab4mic pinned to 0.1.1 in both notebooks; LabConstrictor-Tools pinned to v0.3.0-alpha.1; third-party GitHub Actions pinned to commit SHAs.
  • Installer icons cropped from the original microscope emblem.

Documentation and listing

  • README rewritten as an illustrated how-to: install, a first simulation in napari and Fiji, common problems. Its "open an issue" links point to this repository.
  • labconstrictor-app.yaml for the LabConstrictor App Centre, listing both notebooks.

This repository becomes the home (commit c9229a7)

  • README, labconstrictor-app.yaml, the download page and its template now point to HenriquesLab/LabConstrictor-VLab4Mic; the installed app's update check (github_owner in app/menuinst/Welcome.ipynb) and the Windows publisher name follow.

Testing

  • Automated: the test workflow passes on this branch (run on c9229a7; the later merge only changes README links) and on every merge to the fork's main. Release 0.1.7 built for Windows, macOS and Linux in the fork, and the App Centre manifest check passed.
  • By hand (alpha.4 testing round, LabConstrictor-Tools#141), macOS 26.5 on Apple silicon, VLab4Mic 0.1.7: installation, registration and the bridge's doctor check, STED and SMLM simulations in napari 0.9.2, and in Fiji simulations of four structures (IX15, 7R5K, 3J3Y, 8GMO) plus an identical-image comparison (SSIM 1.0, Pearson 1.0). All passed.
  • Not yet tested by hand: Windows and Linux.

Known issues (not fixed here)

Two other bugs found in the same test round (a flat or all-zero reference accepted by compare_images, and a raw error for a structure file that is not .cif/.pdb) were fixed in 0.1.7 and are part of this pull request.

Please confirm

The App Centre details in labconstrictor-app.yaml were drafted from the README and the tools' docstrings. Could you confirm or correct them before merging?

  • doi: 10.64898/2026.06.02.729521: the paper to cite.
  • Inputs: "Molecular structures: choose a PDB ID or provide a .cif/.pdb file; configure probe, labelling and acquisition" and "Image comparison: a reference and simulated 2D image with their pixel sizes (napari/Fiji tools)".
  • Outputs: "Simulated and noiseless fluorescence microscopy images, with pixel size" and "Image comparison scores (SSIM and Pearson correlation) when using the comparison tool". The images do not carry their pixel size (it is reported with the result, see Simulated images from the napari/Fiji tool carry no pixel size #8), so we suggest "with their pixel size reported".
  • Limitations: "The napari and Fiji tools return one frame; multi-frame runs, parameter sweeps and advanced probe design require notebooks" and "In the default 1000 nm field a widefield image at 100 nm per pixel has only 10 x 10 pixels; raise Sample size XY".
  • First steps (quickstart): the four lines that start with "Install and launch VLab4Mic".

After merging

  1. Make sure GitHub Actions are enabled, and add the LABCONSTRICTOR_SYNC_TOKEN secret (used by the template sync workflow).
  2. Publish a release (for example 0.1.8). The release workflow builds the installers and updates the download page; until then its links point to a release that does not exist here yet.
  3. We will then point the App Centre and the testing docs to this repository, and keep the fork as a mirror.
  4. Optional: delete the five submission/* branches, whose pull requests are closed.

🤖 Generated with Claude Code

https://claude.ai/code/session_016e7LyyvwJLNr6Rswtd3wEr

claude and others added 30 commits October 7, 2026 06:04
Ran the repository's own migrations (.template_sync/sync.py, the chain 0.1.3 -> 0.1.14) against the upstream LabConstrictor main. Brings the certificate-resilient installer hooks, the launcher self-test, the updated environment.yaml and the new Welcome page.

Two things the migrations leave open are set here:
- the hooks keep a literal PYTHON_PROJ_NAME (it is only used when the app ships a setup.py): set to vlab4mic
- requirements_gpu.txt is created empty, and the hook installs it instead of requirements.txt when it finds an NVIDIA GPU: regenerated with .tools/python/merge_requirements.py

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
0.1.1 passes random_seed to the random generators for particle rotations, orientations, axial offsets and degree-of-labelling draws, which were unseeded in 0.1.0. Verified with a 1XI5 / NHS_ester / Widefield simulation: with random rotations on and a fixed seed, two runs give different images on 0.1.0 and identical images on 0.1.1 (random orientations were already reproducible on 0.1.0). It removes the five *_Thev2016 modality configs, which neither notebook uses. image_vsample keeps its signature, and vlab4micjupyter 0.1.0 accepts it (requires vlab4mic>=0.0.10).

requirements.txt and requirements_gpu.txt regenerated with .tools/python/merge_requirements.py.

Checked in a clean environment with vlab4mic 0.1.1 and vlab4micjupyter 0.1.0: both import, and a Widefield simulation completes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
…tools bridge)

Adds two tools in the new package vlab4mic_lc_tools (the name the installer looks for: <package>_lc_tools):
- Simulate imaging of a virtual sample: image_vsample with a structure, a probe, a fluorophore, a modality, a number of particles and a field of view; returns the simulated and the noiseless image and the pixel size. The first run of a structure downloads it. A probe that needs a target sequence, or that was made for another structure, is explained before anything is built.
- Compare an image with a reference: SSIM and Pearson correlation after matching the pixel sizes (the VLab4Mic metrics, with all pixels counted).

Installer: the hooks are the bridge-aware ones (register the app after the install, unregister at uninstall, never fail the install), rendered for this app; setup.py packages the module; construct.yaml ships it. The module is split in two files because the template's bump_constructor.py ships setup.py only when src/ holds more than __init__.py files.

Tests: tests/test_lc_tools_declaration.py (declarations valid and light, choices and probe rules match the configuration files of the installed vlab4mic) and lc_tests/ (20 cases through the real worker: every modality, the two nuclear-pore examples, the explained errors, the comparison tool). All pass with vlab4mic 0.1.1.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
simulate_sample now exposes the notebook's settings: four structures, five modalities, notebook defaults and ranges (one particle,
random orientations and rotations, 1000 x 100 nm sample, 1 ms exposure), probe distance, wobble, degree of labelling, structural
integrity, minimal distance, axial offset, expansion, noise and the modality parameters (pixel size, PSF, localisations).
An antibody without a target sequence is valid (VLab4Mic picks one); a pixel size that is not a multiple of the PSF sampling rate is
explained instead of failing inside the library.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
Sync LabConstrictor template 0.1.3 -> 0.1.14
Expose VLab4Mic to Napari, Fiji and the command line (LabConstrictor tools bridge)
VLab4Mic draws every photon of every emitter as a coordinate, so the memory grows with exposure x emitters x particles: one clathrin
particle needs 26 GB for 1 s and 263 GB for 10 s (the form allowed up to 10 s). A MemoryError is explained before anything is
simulated, with the longest exposure that fits (2 GB limit).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
…guard

Refuse exposures that would need more memory than allowed
…lace)

Needs labconstrictor-tools with Replace (hosts without it add a new layer or window per run).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
Each simulation replaces the previous simulated/noiseless images
…iji, common problems) (#6)

Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN

Co-authored-by: Claude <noreply@anthropic.com>
…cy, wobble, structural integrity); structure file and orientation angle lists (#7)

Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN

Co-authored-by: Claude <noreply@anthropic.com>
Add labconstrictor-app.yaml for the LabConstrictor App Centre
…to confirm)

Adds the bioRxiv preprint DOI and short facts copied from the README
(inputs, outputs, limitations). Nothing else in the manifest changes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016e7LyyvwJLNr6Rswtd3wEr
App manifest: add doi, inputs, outputs and limitations
…-audit-2026-10-11

docs: list VLab4Mic notebooks and correct App Centre manifest
…-icon-2026-10-11

Use cropped original VLab4Mic logo in installer and App Centre
claude and others added 18 commits October 12, 2026 08:22
…ptr4

Manifest: write napari in lower case
Thirteen mentions in the how-to and the bridge section; link targets and
image paths were already lower case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016e7LyyvwJLNr6Rswtd3wEr
The napari plugin repository is now CellMigrationLab/LabConstrictor-napari.
Update repository URLs and prose in docs and data. The Python package
name napari-labconstrictor is unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
Point README to the renamed LabConstrictor-napari repository
* ci: pin third-party GitHub Actions to full commit SHAs

Pin every uses: in .github/workflows to the 40-character commit SHA of the
tag it named (tag kept as trailing comment). No version is changed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN

* ci: pin the template-sync migration resource workflows too

The resources under .template_sync/resources carry copies of workflows that a
migration writes into the app; pin them the same way so a migration does not
bring unpinned actions back.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN

---------

Co-authored-by: Claude <noreply@anthropic.com>
* Pin LabConstrictor-Tools to v0.3.0-alpha.1

Move LC_TOOLS_PIN from v0.2.0-rc.1 to v0.3.0-alpha.1 in
app/bash_bat_scripts/post_install.sh and post_install.bat. Frozen
migration resources under .template_sync/ are left unchanged.

Do not merge until the Tools tag v0.3.0-alpha.1 exists.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN

* README: pinned Tools install, install rules, hosts; add tests workflow

README: Tools pip line pinned to v0.3.0-alpha.1 (as post_install); no-space path and Linux -u (only after a finished install) rules; tools are listed in napari and Fiji, not QuPath.
.github/workflows/tests.yml: pytest + labconstrictor-tools check/test with the Tools tag read from post_install.sh.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN

* README: drop install rules (they live in the Tools docs); link to them

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN

* lc_tests: make_fixtures.py writes mini_ring.cif (the structure_file case used a fixture that was never created)

The case simulate_sample with structure_file fixtures/mini_ring.cif failed with FileNotFoundError (the file was neither committed nor generated). The generated file is a ring of lysine CA atoms (target of the default NHS ester probe) with the entity records VLab4Mic reads.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: guijacquemet <25171305+guijacquemet@users.noreply.github.com>
…pdb or not found (#19)

* compare_images refused only a flat simulated image; a flat or all-zero reference returned COMPLETE with a similarity (0.17 / 0.86). Both images are checked now, and before VLab4Mic is imported.
* simulate_sample with a structure file of another type (for example .csv) failed inside VLab4Mic with `'MolecularReplicates' object has no attribute 'struct'` (the library prints "not a valid format" and carries on). The file type (.cif or .pdb, the formats VLab4Mic reads) and its existence are checked first, with a sentence naming the file; a read error on a structure file no longer blames the internet connection.
* Tests: unit tests (fail on the old code), fixtures `zero_20nm.tif` and `not_a_structure.csv`, three new lc_tests cases.


Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: guijacquemet <25171305+guijacquemet@users.noreply.github.com>
The download page (and its template, which the release workflow copies)
linked to HenriquesLab/LabConstrictor-VLab4Mic release 0.1.7, which does
not exist there: every installer link returned 404. Releases 0.1.4 to
0.1.7 are published here, so the links, the README's Releases links and
its last issue link now point to this repository. When the HenriquesLab
repository becomes the home of the app, an upstream pull request switches
them back.


Claude-Session: https://claude.ai/code/session_016e7LyyvwJLNr6Rswtd3wEr

Co-authored-by: Claude <noreply@anthropic.com>
For the upstream pull request: once this repository holds the app, every
place that names its home points here instead of the CellMigrationLab
fork, where releases 0.1.4 to 0.1.7 were built.

- README: Releases page and issue links.
- labconstrictor-app.yaml: the two Colab notebook links and docs_url.
- Download page and its template (the release workflow copies the
  template for each new version): installer links. They resolve once a
  release is published here.
- app/menuinst/Welcome.ipynb: github_owner, so an installed app checks
  this repository for notebook updates.
- post_install.bat: the publisher Windows shows under Apps & features.

The template fills the last two from the repository owner; the links to
the LabConstrictor template, LabConstrictor-Tools and the plugins stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016e7LyyvwJLNr6Rswtd3wEr

Copy link
Copy Markdown
Contributor Author

@brunomsaraiva could you review this one when you have a moment? The "Please confirm" section lists the App Centre details we drafted for VLab4Mic and would like you to check.


Generated by Claude Code

guijacquemet and others added 2 commits October 23, 2026 22:54
… are open (#22)

Issues are turned off in this repository, so the two 'open an issue'
links pointed to a page that does not exist. They now point to
HenriquesLab/LabConstrictor-VLab4Mic, where issues are enabled (and where
the app moves once the upstream pull request is merged).


Claude-Session: https://claude.ai/code/session_016e7LyyvwJLNr6Rswtd3wEr

Co-authored-by: Claude <noreply@anthropic.com>
@brunomsaraiva
brunomsaraiva merged commit 5ccdc8d into HenriquesLab:main Oct 28, 2026
2 checks passed
@brunomsaraiva

Copy link
Copy Markdown
Contributor

Hi @guijacquemet, I've now merged the PR. Issue #7 is fixed and closed, I'll leave #8 open for now.

@guijacquemet
guijacquemet deleted the claude/festive-cannon-epptr4 branch November 15, 2026 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants