Skip to content

Updated Backsub and docs#590

Merged
jmuhlich merged 3 commits intolabsyspharm:masterfrom
kbestak:backsub_update
Nov 18, 2025
Merged

Updated Backsub and docs#590
jmuhlich merged 3 commits intolabsyspharm:masterfrom
kbestak:backsub_update

Conversation

@kbestak
Copy link
Copy Markdown
Contributor

@kbestak kbestak commented Nov 18, 2025

Hi,

We've recently pushed an updated Backsub version 0.5.1 that is more lightweight, as efficient, and allows for compression of autofluorescence-subtracted pyramidal OME-TIFFs (by default with lzw). I've updated the docs accordingly.

Compression can be toggled off by setting --compression none if users do not want that functionality.

Introducing the compression, from our testing, only affects running Mesmer (which in the provided container) doesn't have imagecodecs. Using Recyze is anyway recommended when using it which mitigates the potential conflict.

Backsub now throws an error if the background does not match any marker_name value, and a warning if the background column is empty.

If the background value appears multiple times in the marker_name column (even with the strong recommentation to have unique values in the marker_name column), only the first value is used as the respective background. Closes #559

I think this PR should close #570 because the issue mentioned has no possibility to appear with the updated version.

@jmuhlich
Copy link
Copy Markdown
Contributor

Why lzw as the default though? zlib compresses better on 16-bit scientific images in my experience, and tifffile can read it without imagecodecs too.

@kbestak
Copy link
Copy Markdown
Contributor Author

kbestak commented Nov 18, 2025

We chose LZW only because it worked faster than ZLIB for writing files. I can add the compression default as zlib in this PR if preferred.

@jmuhlich
Copy link
Copy Markdown
Contributor

Please do make zlib the default for mcmicro. I think a little extra time writing files is worth the smaller file sizes for reduced storage cost. Also smaller files will load faster during later analysis steps since I/O is the bottleneck, not the CPU time needed for decompression (for any storage except maybe fast local SSD). Plus we're using zlib for all other tiff compression already.

@kbestak
Copy link
Copy Markdown
Contributor Author

kbestak commented Nov 18, 2025

Done, thanks for the feedback Jeremy!

@jmuhlich
Copy link
Copy Markdown
Contributor

The documentation should also state that zlib is the default compression rather than lzw. I know the tool itself has lzw as the default but I think the mcmicro docs should reflect mcmicro's behavior.

@kbestak
Copy link
Copy Markdown
Contributor Author

kbestak commented Nov 18, 2025

That's a good point, thanks!

@jmuhlich
Copy link
Copy Markdown
Contributor

I guess the singularity test is failing just because there isn't enough space on the runner to download all the container images. 🤷

@jmuhlich jmuhlich merged commit 11dbe9a into labsyspharm:master Nov 18, 2025
20 of 22 checks passed
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.

Backsub Changes All Fluorescence to DAPI Backsub is not working with new update?

2 participants