glencoesoftware / raw2ometiff

Raw format to OME-TIFF converter
GNU General Public License v2.0
46 stars 20 forks source link

raw2ometiff is apparently incompatible with default output of bioformats2raw #93

Closed JohnGrime closed 1 year ago

JohnGrime commented 1 year ago

Hi,

I'm trying to generate an OME TIFF image pyramid from the LuCa-7color_Scan1.qptiff example file provided at the following address:

https://downloads.openmicroscopy.org/images/Vectra-QPTIFF/perkinelmer/PKI_scans/

However, the output of bioformats2raw does not seem to be properly processed by raw2ometiff. The raw2ometiff tool is apparently looking for a directory that does not exist in the image pyramid data:

(base) PS C:\Users\jgrime\Desktop\ViV\OME_convert_test> bioformats2raw ..\example_data\LuCa-7color_Scan1.qptiff test --resolutions 4

C:\Users\jgrime\Desktop\ViV\OME_convert_test>C:\Users\jgrime\Anaconda3\bin\..\share\bioformats2raw-0.5.0-0\bin\bioformats2raw ..\example_data\LuCa-7color_Scan1.qptiff test --resolutions 4

(base) PS C:\Users\jgrime\Desktop\ViV\OME_convert_test> dir test

    Directory: C:\Users\jgrime\Desktop\ViV\OME_convert_test\test

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         1/10/2023  10:33 AM                0
d-----         1/10/2023  10:33 AM                1
d-----         1/10/2023  10:33 AM                2
d-----         1/10/2023  10:33 AM                3
d-----         1/10/2023  10:32 AM                OME
-a----         1/10/2023  10:32 AM             35 .zattrs
-a----         1/10/2023  10:32 AM             25 .zgroup

(base) PS C:\Users\jgrime\Desktop\ViV\OME_convert_test> raw2ometiff test test.ome.tiff

C:\Users\jgrime\Desktop\ViV\OME_convert_test>C:\Users\jgrime\Anaconda3\bin\..\share\raw2ometiff-0.3.0-0\bin\raw2ometiff test test.ome.tiff
Exception in thread "main" picocli.CommandLine$ExecutionException: Error while calling command (com.glencoesoftware.pyramid.PyramidFromDirectoryWriter@fba92d3): java.lang.RuntimeException: java.io.IOException: Path 'C:\Users\jgrime\Desktop\ViV\OME_convert_test\test\4' is not a valid path or not a directory.
        at picocli.CommandLine.executeUserObject(CommandLine.java:1792)
        at picocli.CommandLine.access$900(CommandLine.java:145)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2150)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2144)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2108)
        at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1968)
        at picocli.CommandLine.parseWithHandlers(CommandLine.java:2349)
        at picocli.CommandLine.parseWithHandler(CommandLine.java:2284)
        at picocli.CommandLine.call(CommandLine.java:2560)
        at com.glencoesoftware.pyramid.PyramidFromDirectoryWriter.main(PyramidFromDirectoryWriter.java:210)
Caused by: java.lang.RuntimeException: java.io.IOException: Path 'C:\Users\jgrime\Desktop\ViV\OME_convert_test\test\4' is not a valid path or not a directory.
        at com.glencoesoftware.pyramid.PyramidFromDirectoryWriter.call(PyramidFromDirectoryWriter.java:241)
        at com.glencoesoftware.pyramid.PyramidFromDirectoryWriter.call(PyramidFromDirectoryWriter.java:97)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1783)
        ... 9 more
Caused by: java.io.IOException: Path 'C:\Users\jgrime\Desktop\ViV\OME_convert_test\test\4' is not a valid path or not a directory.
        at com.bc.zarr.ZarrUtils.ensureDirectory(ZarrUtils.java:159)
        at com.bc.zarr.ZarrGroup.open(ZarrGroup.java:94)
        at com.bc.zarr.ZarrGroup.open(ZarrGroup.java:87)
        at com.glencoesoftware.pyramid.PyramidFromDirectoryWriter.getZarrGroup(PyramidFromDirectoryWriter.java:497)
        at com.glencoesoftware.pyramid.PyramidFromDirectoryWriter.findNumberOfResolutions(PyramidFromDirectoryWriter.java:551)
        at com.glencoesoftware.pyramid.PyramidFromDirectoryWriter.initialize(PyramidFromDirectoryWriter.java:648)
        at com.glencoesoftware.pyramid.PyramidFromDirectoryWriter.call(PyramidFromDirectoryWriter.java:227)
        ... 11 more

(base) PS C:\Users\jgrime\Desktop\ViV\OME_convert_test>

I installed both applications via Conda, which lists their versions as:

bioformats2raw            0.5.0                         0    ome
bioformats2raw-libs       0.5.0                         0    ome

raw2ometiff               0.3.0                         0    ome
raw2ometiff-libs          0.3.0                         0    ome
melissalinkert commented 1 year ago

This issue was fixed in raw2ometiff 0.3.1 (see #81). If you are using bioformats2raw 0.5.0, it is important to use raw2ometiff 0.3.1 or later.

Note that the latest release of bioformats2raw is 0.6.0; if you use bioformats2raw 0.6.0, raw2ometiff should be upgraded to 0.4.0.

All releases are available from:

https://github.com/glencoesoftware/bioformats2raw/releases https://github.com/glencoesoftware/raw2ometiff/releases

We do not directly control which versions are in Conda - see https://github.com/ome/conda-bioformats2raw and https://github.com/ome/conda-raw2ometiff.

If you still see issues after upgrading, please let us know.

JohnGrime commented 1 year ago

Got it - thanks!