BodenmillerGroup / cytomapper

R package for visualization of highly multiplexed imaging data
https://bodenmillergroup.github.io/cytomapper/
31 stars 9 forks source link

show clustering groups in cytomapper #59

Closed sailseem closed 2 years ago

sailseem commented 2 years ago

Dear developer,

Sorry to bother you, well, I got the results following steinbock and read in R using IMCtools. I got some clusters info after running UMAP. How can I input these cluster infos into cytomapper and make it visualized in certain images?

Thank you very much for your help.

Fan

nilseling commented 2 years ago

Hi @sailseem

have a look at the IMC data analysis workflow - read data section how to read in images and set metadata correctly.

Once you have read in the images and stored the cluster IDs in a colData slot (e.g. colData(sce)$cluster_id) have a look at the cytomapper quickstart how to visualize cell metadata on segmentation masks.

In your case this will be:

plotCells(mask = masks, object = sce,
                cell_id = "ObjectNumber", img_id = "sample_id", 
                colour_by = "cluster_id")

You can subset the CytoImageList object (e.g. masks["imageXYZ"]) prior to plotting to visualize only selected images.

sailseem commented 2 years ago

Great! Thank you very much for providing such a great package!!!

nilseling commented 2 years ago

You are welcome :)