gustaveroussy / sopa

Technology-invariant pipeline for spatial omics analysis (Xenium / MERSCOPE / CosMx / PhenoCycler / MACSima / Hyperion) that scales to millions of cells
https://gustaveroussy.github.io/sopa/
BSD 3-Clause "New" or "Revised" License
114 stars 11 forks source link

[Bug]ArrowInvalid: Parquet magic bytes not found in footer. Either the file is corrupted or this is not a parquet file. #106

Open Yifan-debug opened 1 month ago

Yifan-debug commented 1 month ago

Description

I try to learn the sopa with example data.

Here is the code I copy from example file. patches = sopa.segmentation.Patches2D(sdata, image_key, patch_width=1200, patch_overlap=50) patches.write() from sopa._sdata import get_spatial_image print(get_spatial_image(sdata, image_key).c.values) channels = ["DAPI"] method = sopa.segmentation.methods.cellpose_patch(diameter=35, channels=channels, flow_threshold=2, cellprob_threshold=-6) segmentation = sopa.segmentation.StainingSegmentation(sdata, method, channels, min_area=2500)

The cellpose boundaries will be temporary saved here. You can choose a different path

cellpose_temp_dir = "tuto.zarr/.sopa_cache/cellpose" segmentation.write_patches_cells(cellpose_temp_dir)

cells = sopa.segmentation.StainingSegmentation.read_patches_cells(cellpose_temp_dir) cells = sopa.segmentation.shapes.solve_conflicts(cells) shapes_key = "cellpose_boundaries" # name of the key given to the cells in sdata.shapes sopa.segmentation.StainingSegmentation.add_shapes(sdata, cells, image_key, shapes_key)

Expected behavior

This is my first time run the example data, I don't know what is should like.

System

Yifan-debug commented 1 month ago

sopa_error_example_data.md

I think this is the same issue as I reported in another issue #107. But this one is I tried in example data. ultimately, I try to work in comseg segmentation.

Another issue is. I pip install comseg in sopa environmenta, and sopa patchify comseg. And it said there is no such command comseg eventhough I have successfully pip install comseg.

quentinblampey commented 1 month ago

I think this is indeed the same issue as in #107. Which version of Sopa do you use? Try to upgrade sopa and this should all be fixed 🙂