Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot convert svs to ome-tiff #175

Closed
gsakkis opened this issue Nov 4, 2022 · 4 comments · Fixed by #241
Closed

Cannot convert svs to ome-tiff #175

gsakkis opened this issue Nov 4, 2022 · 4 comments · Fixed by #241
Labels
bioformats-bug Requires an update to Bio-Formats, not specific to bioformats2raw

Comments

@gsakkis
Copy link

gsakkis commented Nov 4, 2022

Hi, new to bioformats2raw/raw2ometiff. I'm trying to convert CMU-1-Small-Region.svs to OME-TIFF by first converting it to Zarr via bioformats2raw and then to OME-TIFF via raw2ometiff. However the latter complains about a missing directory:

$ bioformats2raw CMU-1-Small-Region.svs /tmp/CMU-1-Small-Region.ome.zarr
$ ll /tmp/CMU-1-Small-Region.ome.zarr
total 16
drwxrwxr-x 2 gsk gsk 4096 Νοε   4 18:32 OME
drwxrwxr-x 7 gsk gsk 4096 Νοε   4 18:32 0
drwxrwxr-x 4 gsk gsk 4096 Νοε   4 18:32 1
drwxrwxr-x 6 gsk gsk 4096 Νοε   4 18:32 2

$ raw2ometiff /tmp/CMU-1-Small-Region.ome.zarr /tmp/CMU-1-Small-Region.ome.tiff
Exception in thread "main" picocli.CommandLine$ExecutionException: Error while calling command (com.glencoesoftware.pyramid.PyramidFromDirectoryWriter@3b2cf7ab): java.lang.RuntimeException: java.io.IOException: Path '/tmp/CMU-1-Small-Region.ome.zarr/3' is not a valid path or not a directory.

What am I missing?

Versions:

$ bioformats2raw --version .
Version = 0.5.0
Bio-Formats version = 6.10.1
NGFF specification version = 0.4

$ raw2ometiff --version .
Version = 0.3.0
Bio-Formats version = 6.4.0
@melissalinkert
Copy link
Member

@gsakkis : That problem should have been fixed in glencoesoftware/raw2ometiff#81, which was released in raw2ometiff 0.3.1. Can you try updating your raw2ometiff version to 0.3.1 and see if that works? You shouldn't need to re-run the bioformats2raw command, just raw2ometiff.

@gsakkis
Copy link
Author

gsakkis commented Nov 4, 2022

@melissalinkert thanks for the prompt reply! raw2ometiff 0.3.1. doesn't seem to be available in conda that I use for installing the packages; I'll try to install it manually and see if it works.

@gsakkis
Copy link
Author

gsakkis commented Nov 6, 2022

So I installed raw2ometiff 0.3.1 and it does run without an error, great! Now I am comparing the original svs file with the final ome-tiff and there are some discrepancies, at least according to tifffile:

  • Original CMU-1-Small-Region.svs
TiffFile 'CMU-1-Small-Region.svs'  1.85 MiB  svs  4 Pages  4 Series

TiffPageSeries 0  'Baseline'  2967x2220x3  uint8  YXS  SVS  1 Pages
TiffPageSeries 1  'Thumbnail'  768x574x3  uint8  YXS  SVS  1 Pages
TiffPageSeries 2  'Label'  463x387x3  uint8  YXS  SVS  1 Pages
TiffPageSeries 3  'Macro'  431x1280x3  uint8  YXS  SVS  1 Pages
  • Converted CMU-1-Small-Region.ome.tiff
TiffFile 'CMU-1…e.tiff'  11.72 MiB  big-endian  BigTiff  ome  9 Pages  3 Series

TiffPageSeries 0  3x2967x2220  uint8  CYX  OME  2 Levels  3 Pages
TiffPageSeries 1  'macro image'  3x463x387  uint8  CYX  OME  2 Levels  3 Pages
TiffPageSeries 2  'label image'  3x431x1280  uint8  CYX  OME  4 Levels  3 Pages
  • Comparison:
    • There are 4 page series in the original, 3 in the converted; the "Thumbnail" series is apparently missing.
    • The original has 4 pages (1 per series), the converted 9 (3 per series).
    • The original has 1 resolution level per series, the converted has 2 or 4 (although I ran bioformats2raw with --use-existing-resolutions).
    • The labels of the 'Macro' and 'Label' series are swapped in the converted.

What is the reason of these differences? Are there any optional parameters/flags I can pass to preserve as much of the original structure as possible?

@melissalinkert melissalinkert added the bioformats-bug Requires an update to Bio-Formats, not specific to bioformats2raw label Mar 31, 2023
@melissalinkert
Copy link
Member

Apologies for not following up on this sooner, @gsakkis. Ultimately these issues are down to outstanding problems in Bio-Formats; there isn’t currently a work-around in bioformats2raw.

For reference, open Bio-Formats issues related to SVS:

ome/bioformats#3682
ome/bioformats#3682
ome/bioformats#3986

We’ll update here once there is a Bio-Formats release that fixes these issues.

@melissalinkert melissalinkert moved this from Inbox to bioformats2raw 0.9.2 in Converters Feb 9, 2024
@melissalinkert melissalinkert linked a pull request Feb 9, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from bioformats2raw 0.9.2 to Done in Converters Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bioformats-bug Requires an update to Bio-Formats, not specific to bioformats2raw
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants