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

Can't remove series from directory structure with --scale-format-string #179

Closed
LucaMarconato opened this issue Dec 6, 2022 · 4 comments · Fixed by #181
Closed

Can't remove series from directory structure with --scale-format-string #179

LucaMarconato opened this issue Dec 6, 2022 · 4 comments · Fixed by #181

Comments

@LucaMarconato
Copy link

As suggested in the readme, I am trying to remove the series from the directory structure with the argument --scale-format-string.

The full command I am using is

bioformats2raw data/Xenium_FFPE_Human_Breast_Cancer_Rep1_morphology_mip.ome.tif data.zarr/images/morphology_mip -p --max-workers 16 --no-root-group --no-ome-meta-export --scale-format-string '%2$d/'

Unfortunately I see that .zattrs doesn't fill in the path for the multiscale transformations, leading to the inability for napari-ome-zarr to open the image.

   "datasets" : [ {
      "path" : "",
      "coordinateTransformations" : [ {
        "scale" : [ 1.0, 1.0, 1.0, 0.2125, 0.2125 ],
        "type" : "scale"
      } ]
    }, {
      "path" : "",
      "coordinateTransformations" : [ {
        "scale" : [ 1.0, 1.0, 1.0, 0.425, 0.425 ],
        "type" : "scale"
      } ]
    }, 
...
@LucaMarconato LucaMarconato changed the title Can't remove series from directory structure Can't remove series from directory structure with --scale-format-string Dec 6, 2022
melissalinkert added a commit to melissalinkert/bioformats2raw that referenced this issue Dec 8, 2022
Fixes glencoesoftware#179.

This removes trailing slashes (as would be present with `--scale-format-string '%2$d/'`)
so that the relative dataset path is not empty.
@melissalinkert
Copy link
Member

Thanks, @LucaMarconato. #181 should fix this issue; if you have a chance to test it, we'd welcome any feedback.

@giovp
Copy link

giovp commented Jan 5, 2023

@melissalinkert thanks for taking a look at this! I wanted to try out #181 but couldn't install it in dev mode. I could only install it via conda. Could you walk me through the developer installation to check out #181 ?

Thanks!

@melissalinkert
Copy link
Member

@giovp : from https://github.com/glencoesoftware/bioformats2raw/pull/181/checks:

  • click Gradle on the left-hand side
  • scroll to the bottom of the page and click bioformats2raw under Artifacts. That should download a bioformats2raw.zip file which is a build of bioformats2raw with the changes in Fix dataset paths when --scale-format-string is used #181
  • unzip bioformats2raw.zip
  • unzip the extracted bioformats2raw-0.7.0-SNAPSHOT.zip
  • run bin/bioformats2raw (with the usual options) from the unzipped bioformats2raw-0.7.0-SNAPSHOT directory

bin/bioformat2raw --version should show Version = 0.7.0-SNAPSHOT, indicating that this is a development build. If any of that doesn't work, just let us know.

@giovp
Copy link

giovp commented Jan 6, 2023

fantastic, very useful, it works!

 "name" : "Image0",
    "datasets" : [ {
      "path" : "0",
      "coordinateTransformations" : [ {
        "scale" : [ 1.0, 1.0, 1.0, 0.2125, 0.2125 ],
        "type" : "scale"
      } ]
    }, {
      "path" : "1",
      "coordinateTransformations" : [ {
        "scale" : [ 1.0, 1.0, 1.0, 0.425, 0.425 ],
        "type" : "scale"
      } ]
    }, {
      "path" : "2",
      "coordinateTransformations" : [ {
        "scale" : [ 1.0, 1.0, 1.0, 0.85, 0.85 ],
        "type" : "scale"
      } ]
    }, {
    ```

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 a pull request may close this issue.

3 participants