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
94 stars 8 forks source link

upstream analysis #44

Closed rocketeer1998 closed 2 months ago

rocketeer1998 commented 3 months ago

Hi @quentinblampey, thanks for your contribution to Sopa! After reading your manuscript, I wonder if Sopa supports upstream analysis such as image registration, blob detection, and transcript decoding?

quentinblampey commented 3 months ago

Hello @rocketeer1998!

Yes, image registration can be performed as detailed in this tutorial. I may soon try to improve this tutorial, so let me know if you have any feedback 😊

Concerning blob detection and transcript decoding, can you provide more details on what you intend to do?

rocketeer1998 commented 3 months ago

Thanks for your quick response! I would like to perform cyclic image registration, blob detection and transcript decoding just as starfish (https://spacetx-starfish.readthedocs.io/en/latest/index.html) does. I quote the intro from this URL which says "starfish is a Python library for processing images of image-based spatial transcriptomics. It lets you build scalable pipelines that localize and quantify RNA transcripts in image data generated by any FISH method, from simple RNA single-molecule FISH to combinatorial barcoded assays. Image processing of an experiment is divided into fields of view (FOV) that correspond to the data produced by a microscope at a single location on a microscope slide. Each FOV is processed into a table of spots localized in 3D and then spots are aggregated into a cell x gene expression matrix by comparing physical positions of spots and cells."

quentinblampey commented 3 months ago

Thanks for these details. What type of data do you have exactly?

Sopa takes as input raw images and transcripts (XY location and name of each transcript). This is what gives standard machines such as the MERSCOPE/Xenium/CosMX.

So, according to your message, I imagine you don't have these raw images/transcripts yet? For now, Sopa doesn't include any step prior to the images or transcripts, but new features can be developed

rocketeer1998 commented 2 months ago

We're using in situ sequencing as a basic tool in our lab, which is almost the same as 10x Xenium, but with a different output. After cyclic imaging, there are c (number of fluorescent channels) * r (rounds of sequencing) images produced in each field of view. Then we use in-house scripts to find and decode blobs from these images. So I wonder if there is a uniform pipeline to scale up this analysis.

quentinblampey commented 2 months ago

Alright, I see. So if I understand correctly, you need to align these images prior to the segmentation (and any other step), right? For now, the image alignment supported in Sopa is mostly used to align different modalities (for instance transcriptomics + H&E), but it's not very convenient for a high number of images to be aligned...

But of course, after image alignment, you can then use Sopa for all the other tasks (such as segmentation, annotation, QC, report, visualization, spatial stats, ...)

rocketeer1998 commented 2 months ago

OK. Thanks a lot!