Skip to content

feat(nextflow): deconvolve fluorescence in the reconstruct step - #468

Open
srivarra wants to merge 3 commits into
mainfrom
feat/fluorescence-reconstruct
Open

srivarra wants to merge 3 commits into
mainfrom
feat/fluorescence-reconstruct

Conversation

@srivarra

@srivarra srivarra commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Related issue

Closes #462.

Summary

GFP and mCherry deconvolution had to run by hand after the pipeline. The reconstruct step takes one waveorder config, and waveorder refuses fluorescence and phase in the same config.

A reconstruct config now lists waveorder configs by name under reconstructions:. Each one gets its own transfer function and per-position tasks, and all of them write into the one reconstruct plate. The zebrafish config adds Richardson-Lucy deconvolution of gfp and mcherry on GPUs, with the settings from the neuromast sweeps. Virtual staining starts once phase is done and runs beside the deconvolutions. Assemble waits for all of them.

This breaks existing reconstruct configs. Nest one as reconstructions: {phase: <old config>}.

It needs Biohub/waveorder#595. Without it, waveorder ignores device: cuda and runs Richardson-Lucy on the CPU.

Testing

  • pytest tests: 735 passed, 18 skipped.
  • nextflow run nextflow/tests/gate_shapes.nf passes with the per-reconstruction gates. nextflow lint reports no errors.
  • A local run of the reconstruct module on a two-position plate, with phase and an RL gfp reconstruction, ran both transfer functions, phase on the CPU process and gfp on the GPU process. The plate has both channels and both provenance keys. With the waveorder fix, the gfp task allocated GPU memory and matched the CPU result to within 1e-6.
  • No full mantis-v2 run on a dataset yet.

Checklist

  • I added or updated tests, or this change does not require tests.
  • I updated the documentation, or this change does not require documentation.
  • I confirmed this change does not include confidential or sensitive information.

A reconstruct config lists waveorder configs by name under `reconstructions:`, each with its own transfer function and per-position tasks writing into one plate. The zebrafish config adds Richardson-Lucy deconvolution of GFP and mCherry on GPUs. Virtual staining waits only for the reconstructions writing its source channel; assemble waits for all of them.

Closes #462.
@srivarra

Copy link
Copy Markdown
Collaborator Author

We've merged WaveOrder#595, I think this is ready for you to trial @tayllatheodoro!

This branch has not been deployed

No deployments
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.

Update deconvolve cli to run Richards-Lucy deconvolution

1 participant