-
Notifications
You must be signed in to change notification settings - Fork 28
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
conversion between AnnData and SpatialExperiment object. #61
Comments
I don't know much about I do have a question for @giovp and @ivirshup. Do you plan to keep using this special |
There will be an anndata extension where a lot will change in the way it interacts with images and the actual object format will change. However, we will for sure have methods to just return an anndata with current level of spatial info (small image, scalefactors) in order to be shared/converted. So I believe the |
Cool. I think we can put together something for what you have currently but longer term I would prefer to support the new spatial format directly when that is settled on. I'm guessing what you are doing currently is only really specific to squidpy? That's probably ok but we need to clear about documenting that. |
I think scvi-tools also uses visualization and same anndata slots, as well as e.g. eggplant. Agree with supporting new anndata but don't have schedule on that yet in terms of release. |
sorry for my late answer and thanks for involving me in this discussion, I think it's a relevant issue to solve for our Indeed, with a collaborator ( @davidecrs ) we already tried to implement a first very naive attempt here to this conversion. At the moment, our implementation doesn't include the image storing into the Looking forward to talk more about this. |
About your questions @giovp ,
In
I think you already stored an image in the
This is still an open issue for us, we had several thoughts and implementations about that, but at the moment we decided to not store them in any place. |
indeed we don't have a way to store molecule based data yet so we don't really read it as well. Think starting from the image in uns would be a good starting point.
Indeed that was the solution.
sounds good, where would unstructured metadata be stored in SpaExperiemnt? |
Hello, I hope that I am not disturbing any of you. Since I see that this issue is still open, I like to ask for some guidance. My name in Naime and I work as an scientific employee at Meier's Lab (Helmholtz HPC) I am reading MS imaging data in Anndata format (annotated maldi images) and I want to store the high resolution H&E image (which is from a consecutive tissue layer) in the same Anndata without it being included for spatial computation. (MALDI has its own spatial info already in adata.obsm["spatial"] for spatial coordinates, and registration with H&E image has been done using other libraries) Is there a spesific way or data structure that you suggest for sroting the optical image in Anndata? (an optical image that does not take part in spatial transcriptomics computations) Thank you for your time. :) |
Hi @nh012 I haven't worked much with spatial data so I'm not sure I can answer much. Probably the only place image information can be stored is in I know there has been a lot of work on developing new spatial objects so there may be a better option than using |
Hi all, Any updates on using this to convert a spatial experiment to an anndata object? The data is IMC data.
but got this error
Thanks! |
It's not something we have really looked into. I'm not sure how similar If this is something you would like to push, we would need some example data and more information about which parts do/don't work. A PR would be even better 😸. There is only a couple of weeks to get changes into the next release so the timeline for that is pretty tight. |
Thanks for the quick response! :) Let me check with my supervisor on sharing the data and Ill get back to you |
A small public example dataset would probably be better than something private. Maybe even whatever |
Makes sense! here is a good resource that has the spe object: https://github.com/BodenmillerGroup/IMCDataAnalysis/tree/main This gives the pipeline as well so will provide details on what is in the spatial experiment. |
pinging interested parties @lmweber @drighelli @HelenaLC @ivirshup
Nice to meet you all! I believe with some we crossed paths in some zoom dungeons or email thread. I'd like to use this issue to kick-off conversations about conversions between anndata and spatialexperiment obejcts.
I was trying out the SpatialExperiment object and think it's pretty low hanging fruit for conversion with anndata. I believe all the data types conversions are there (image are
numpy.array
and rest is string/scalar).I should also mention that doing this I managed to plot annotations on spatial coordinates
In anndata we have
adata.obsm["spatial"]
for spatial coordinatesadata.uns["spatial"][<library_id>]["images"]
store the images (with prob different keys than what can be used/plot in SpatialExp?adata.uns["spatial"][<library_id>]["scalefactors"]
store diameters and scale factors of the object.Where do you think this data should be stored in the SpatialExperiment object?
The text was updated successfully, but these errors were encountered: