mahmoodlab / HEST

HEST: Bringing Spatial Transcriptomics and Histopathology together - NeurIPS 2024
Other
164 stars 12 forks source link

Matching cell type annotations with AnnData gene expression vectors #38

Closed merelkuijs closed 1 month ago

merelkuijs commented 3 months ago

Hi all,

Thanks for providing this resource. Is there a way to match CellViT's cell type labels, obtained from the images, with the gene expression vectors in the AnnData object?

Merel

guillaumejaume commented 3 months ago

Hi Merel, you will have to implement a dedicated function, but all the information is provided:

The function would be very similar to: https://github.com/mahmoodlab/HEST/blob/minor-release/src/hest/batch_effect.py#L70

merelkuijs commented 2 months ago

We have Xenium data, so I wrote code to match each AnnData row to a single cell in the pathology slide. I did observe that the distance to the nearest neighbor in the other modality can be quite large, presumably because the Xenium slide and the area used for imaging don't perfectly overlap. For this reason, I'm not very confident that the transferred labels are correct.

I'll drop the code here in a comment once I've tested it, if anyone else is interested. However, I think traditional cell typing (based on gene expression) is going to be a more reliable source of labels than the image-to-anndata label transfer.

pauldoucet commented 2 months ago

Hi @merelkuijs, We're actively working on providing the .h5ad with a pooling of transcripts per cell. We're trying to upload them by the end of this week

xiachenrui commented 2 months ago

Hi @pauldoucet ,

Can we access single cell level expression data of Xenium now.

Best!

guillaumejaume commented 2 months ago

Hi @xiachenrui, release will be announce end of next week with additional samples too. Stay tuned.

pauldoucet commented 2 months ago

Hi @merelkuijs @xiachenrui ,

The aligned transcripts are now available on HF along with 121 new samples.

Please follow tutorial 2 in order to link each transcript to its corresponding cell.

We apologize for coming back to you this late, registration took more time than expected.

xiachenrui commented 2 months ago

Thanks for your great works!

merelkuijs commented 2 months ago

I noticed that all data folders on Hugging Face were updated, except for the wsis folder. Will WSIs be made available for new samples?

pauldoucet commented 1 month ago

It's a mistake from our side, we're uploading the WSI folder now.

Sorry about that

pauldoucet commented 1 month ago

Done, @merelkuijs

merelkuijs commented 1 month ago

Thanks, both for uploading the WSIs and responding so swiftly!