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

[Feature] Multiple run of Cellpose/Baysor #154

Open
lguerard opened this issue Nov 19, 2024 · 6 comments
Open

[Feature] Multiple run of Cellpose/Baysor #154

lguerard opened this issue Nov 19, 2024 · 6 comments

Comments

@lguerard
Copy link
Contributor

Hi !

I put this as a feature, but maybe it's already available (I guess maybe through API mainly).

We're in the parameters optimization step of our pipeline and would like to run Cellpose and/or Baysor with different settings. Is it possible to add more and more Shapes layer in the SpatialData object ?
If so, how do I select the one for Baysor segmentation and/or for the different steps of conflicts or aggregation ?

Thanks a lot !

@quentinblampey
Copy link
Collaborator

Hi @lguerard,

Yes, indeed, I recommend using the API for this. Basically, when running segmentation, you can choose the name of the new shapes layer that will be added to your SpatialData object.
So, you can create multiple shapes layers, and compare them afterwards.

I'll soon release sopa==2.0.0, probably this week or next week, and I highly recommend waiting for this new version because it will be much easier to use. I'll add extra details on how to do that after releasing the new version!

@lguerard
Copy link
Contributor Author

Thanks for the answer !

And really looking forward to test 2.0.0 ! :)

@jackytamkc
Copy link

Hi Quentin,

Thanks for developing such an amazing tool and I also wanted to follow on this thread. Currently when I run cellpose on multiple segmentation (multiple markers + DAPI), the results contain almost all cells are slightly overlapping with each other which gives me the feeling the border conflict is not resolved properly when multiple segmentation is performed.

Also, I would be tempted to know if the new version contains function that allow quick visualization of small segmentation test (something like a preview? I currently do that on cellpose using their GUI), before batch running it altogether.

Really looking forward to the new version, hopefully the spatialdata will be updated soon!

Thanks a lot,
Jacky

@quentinblampey
Copy link
Collaborator

Hello @jackytamkc,

Do you have a screenshot showing the overlap of cells? If the overlap is small, this is not a huge issue. Also, when shapely==2.1.0 is released, I'll add a voronoi method to clean these "small" overlaps.

Yes, in the new version, I'll add a tutorial showing how to try multiple segmentation methods/parameters to experiment quickly! I'll let you know :)

@jackytamkc
Copy link

Hi Quentin,

here's the screenshot, most of the overlap I would say it's acceptable but some areas look messy as you can tell from the image (I ran 4 times cellpose on 4 different channels + DAPI, which are standard output from CosMx data; then I further improve the segmentation by running Baysor).

save_for_github

Thanks!

@quentinblampey
Copy link
Collaborator

Indeed @jackytamkc, some areas are messy, I agree. So, you'll need the "voronoi resolve" which will be added after shapely==2.1.0 is released (they don't have any expected date yet). I'll let you know!

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

No branches or pull requests

3 participants