Multimodal spatial omics analysis of human LUAD by Visium and PhenoCycler
- A Python script integrates spatial omics data by 10x Genomics Visium and Akoya Biosciences PhenoCycler.
- Supposes Visium (not CytAssist) and PhenoCycler-Open (not Fusion) in the example of this repository.
- Imvokes the following DOIT-xxxx scripts (1 to 8).
- Tested with Python 3.12.
- Requires packages such as numpy, pandas, cv2, tifffile, depending on environment.
- Internally invokes R scripts.
- Tested with R 4.3.2 and Seurat v4.4.0 (and will be compatible with v5).
- Results are stored in "FFPE_LUAD_3_B" directory in the current working directory.
% path_to_the_src_directory/src/DOIT_LUAD3B.py
- Downloads and expands the datafile (LUAD3B_dat.tgz) in "dat" directory in the current working directory.
- Generates mask images of Visium tissue region using H&E stain images in the output of SpaceRanger ("dat/Visium_FFPE_LUAD_3_B/spatial").
- Results are browsable from "FFPE_LUAD_3_B/FFPE_LUAD_3_B-Visium-MASK/FFPE_LUAD_3_B-Visium.html".
![]() |
![]() |
![]() |
![]() |
![]() |
H&E stain image | Fiducial marker removal | Binarization | Contour extraction | Mask image |
- Generate mask images of PhenoCycler tissue region using fluorescence intensity in the QPTIFF data by CODEX Processor ("dat/PhenoCycler_LUAD_3_B/Experiment_LUAD_3_B.qptiff")
- Results are browsable from "FFPE_LUAD_3_B/FFPE_LUAD_3_B-PhenoCycler-MASK/FFPE_LUAD_3_B-PhenoCycler.html".
![]() |
![]() |
![]() |
![]() |
![]() |
Fluorescence image | Grayscaling | Binarization | Contour extraction | Mask image |
- Normalizes Visium expression levels by SCTransform normalization (version 1) provided by Seurat.
- Internally invokes an R script (exec_preprocess.r).
- Results are browsable from "FFPE_LUAD_3_B/FFPE_LUAD_3_B-Visium-NORM/FFPE_LUAD_3_B-Visium-NORM.html".
- Aligns mask images of Visium (red) and PhenoCycler (blue) respectively obtained in step 2 and 3 above.
- Mask images are scaled, translated, and rotated (affine transformations) to maximize their overlap.
- Overlap is evaluated by their intersection over union (IoU), i.e., IoU = (Visium ∩ PhenoCycler) / (Visium ∪ PhenoCycler).
- By exhaustive grid search in the neighborhood of the solution obtained above, IoU is optimized to generate the final result.
- Results are browsable from "FFPE_LUAD_3_B/FFPE_LUAD_3_B-ALIGN/FFPE_LUAD_3_B-Visium-PhenoCycler-ALIGN.html".
![]() | ![]() |
![]() |
![]() |
![]() |
Scaling | Translation | Rotation | Optimization |
FFPE_LUAD_3_B_transition_wh_200.mp4
- Evalutes correlation between Visium gene expression level and PhenoCycler antibody fluorescence intensity.
- In circular regions corresponding to Visium spots average of fluorescence intensities are calculated.
- Spatial and quantitative correlations are evaluated.
- Results are browsable from "FFPE_LUAD_3_B/FFPE_LUAD_3_B-EVAL/FFPE_LUAD_3_B-EVAL.html".
- MS4A1 gene expression by Visium and CD20 antibody fluorescence intensity by PhenoCycler.
![]() |
![]() |
Spatial correlation | Quantitative correlation |
- Carries out clustering of Visium spots by Seurat.
- Internally invokes an R script (exec_clustering.r).
- Carries out dimensionality reduction and extracts spatially variable features.
- Results are browsable from "FFPE_LUAD_3_B/FFPE_LUAD_3_B-Visium-CLST/FFPE_LUAD_3_B-Visium-CLST.html".
- Extracts an aligned/integrated region of interest (ROI) image based on mutual coordinate mapping.
- Results are browsable from "FFPE_LUAD_3_B/FFPE_LUAD_3_B-ROI/FFPE_LUAD_3_B-ROI.html".
![]() |
![]() |
PhenoCycler image coordinate (Visium on PhenoCycler) |
Visium image coordinate (PhenoCycler on Visium) |
![]() |
![]() |
A region in the PhenoCycler coordinate | Projection onto the Visium coordinate |
- Cell (nuclear) positions estimated by QuPath/StarDist.
- Colors show the estimated cell types.
- Cell number of each type in the ROI is profiled.
- Positions of Visium spots are indicated by circles.
![]() | ![]() | ![]() |
- Heatmap of fluorescence intensity by PhenoCycler (superimposed).
![]() | ![]() |
- Heatmaps of fluorescence intensity of antibodies by PhenoCycler.
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
DAPI | E-cadherin | CD4 | CD8 | CD20 | CD68 |
- Heatmaps of expression level of features/genes by Visium.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
H&E stain | CDH1 | CD4 | CD8A | MS4A1 | CD68 |
- Cell (nuclear) positions estimated by QuPath/StarDist.
- Colors show the estimated cell types.
- Cell number of each type in the ROI is profiled.
- Positions of Visium spots are indicated by circles.
![]() | ![]() | ![]() |
- Heatmap of fluorescence intensity by PhenoCycler (superimposed).
![]() | ![]() |
- Heatmaps of fluorescence intensity of antibodies by PhenoCycler.
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
DAPI | E-cadherin | CD4 | CD8 | CD20 | CD68 |
- Heatmaps of expression level of features/genes by Visium.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
H&E stain | CDH1 | CD4 | CD8A | MS4A1 | CD68 |