questions about alignment in Figure 2b
Hi @joshmoore , when you mapped each element (xenium rep1, xenium rep2, visium) to the 'aligned' coordinate system, did you use gene expression data? I have checked the code for paper_reproducibility, and I think you didn't consider gene expression data but spatial coordinates. Is that correct? Thank you.
Hi @yuling999666, the affine mapping has been derived with the aim of aligning the full resolution H&E image for Visium and the two full resolution IF images for Xenium. The spatial locations (expression data) are mapped to the images, so the mapping of the images induces a mapping of the spatial locations as well.
Alternative approaches (e.g., STalign) derive the mapping from the transcript data (considering the density maps of the transcripts). For our purposes, an affine transformation gave a satisfactory alignment for meaningful downstream analyses; for more complex tissues, you can choose to align the data with external methods and save the external alignment into the spatialdata object.
Hi @yuling999666, the affine mapping has been derived with the aim of aligning the full resolution H&E image for Visium and the two full resolution IF images for Xenium. The spatial locations (expression data) are mapped to the images, so the mapping of the images induces a mapping of the spatial locations as well.
Alternative approaches (e.g., STalign) derive the mapping from the transcript data (considering the density maps of the transcripts). For our purposes, an affine transformation gave a satisfactory alignment for meaningful downstream analyses; for more complex tissues, you can choose to align the data with external methods and save the external alignment into the spatialdata object.
Hi @LucaMarconato , thank you for the reply. So I need to select the landmarks manually for mapping? It seems that the affine mapping for alignment cannot be used on ST data without images? Thanks!
It can be used as the affine transformation can be computed externally or with other methods (see for instance a more elaborate example here https://github.com/scverse/spatialdata-notebooks/blob/main/notebooks/paper_reproducibility/lundeberg.ipynb, I would not try to run the whole notebook because it's too large, but just have a look at the alignment part). But I agree, with ST data the landmark based approach would be less precise.
It can be used as the affine transformation can be computed externally or with other methods (see for instance a more elaborate example here https://github.com/scverse/spatialdata-notebooks/blob/main/notebooks/paper_reproducibility/lundeberg.ipynb, I would not try to run the whole notebook because it's too large, but just have a look at the alignment part). But I agree, with ST data the landmark based approach would be less precise.
Hi @LucaMarconato , thank you for the response. I appreciate it.