Slide 1

Slide 1 text

Tools and software for functional data analysis of multiplexed imaging data Julia Wrobel, PhD PSB workshop on analysis of single-cell protein data

Slide 2

Slide 2 text

1. Quantify characteristics / features of an image • Features: cell type proportions, degree of immune cell clustering 2. Relate to patient-level or clinical outcome • Features -> model covariates • Outcomes: disease progression, tumor subtype, patient survival time How do multiplex images relate to patient outcomes? B Steinhart, KR Jordan, J Bapat, MD Post, LW Brubaker, BG Bitler, and J Wrobel. Molecular Cancer Research, 19(12) (2021)

Slide 3

Slide 3 text

Spatial point patterns and point processes 3 • Locations of cells are considered random and to follow a point process • Marked point patterns have covariates (cell shape, area, expression of CD3) associated with each point • Multitype point patterns have multiple types of points • Green cells are in tumor issue area • Pink cells are in stromal tissue area • Black cells are macrophages • Quantify macrophage clustering in tumor/stroma

Slide 4

Slide 4 text

• Spatial summary functions describe spatial relationship among cells in an image • Function of radius r • Univariate: among cells of one type (e.g., immune cells) • Bivariate: among two cypes of cells (e.g. macrophages and B-cells) • Often to detect deviations from complete spatial randomness (CSR) • Clustering or repulsion • Many types exist! • I’ll focus on Ripley’s K and Nearest-neighbor G Spatial summary functions based on point processes 4

Slide 5

Slide 5 text

Ripley’s K function 5 𝐸!"# 𝐾 𝑟 = 𝜋𝑟$

Slide 6

Slide 6 text

Nearest neighbor G-function 6

Slide 7

Slide 7 text

Nearest neighbor G-function Which radius should we select for evaluating G? 7

Slide 8

Slide 8 text

Functional data analysis (FDA) • Great framework for modeling spatial proteomics data • In FDA, basic unit of observation is a curve or function 𝑋! 𝑟 • For multiplex imaging 𝑋! 𝑟 is a spatial summary function (e.g. 𝐺! 𝑟 ) 8

Slide 9

Slide 9 text

Uses for FDA in spatial proteomics • Analyze patterns in spatial summary functions across images and patients • No need to choose a single (potentially arbitrary radius) when analyzing spatial summary functions across patients • Less information is discarded • There are functional analogs of common tools like PCA, regression 9

Slide 10

Slide 10 text

Uses for FDA in spatial proteomics • Analyze patterns in spatial summary functions across images and patients • No need to choose a single (potentially arbitrary radius) when analyzing spatial summary functions across patients • Less information is discarded • There are functional analogs of common tools like PCA, regression • Not always easy to implement 10

Slide 11

Slide 11 text

11

Slide 12

Slide 12 text

mxFDA package • Available on GitHub at https://github.com/julia-wrobel/mxfda • Packagedown website created by Alex Soupir • http://juliawrobel.com/mxfda/ • Package functionality: • Generate univariate and bivariate K, G functions • Functional principal components analysis • Regression models with functional covariate • Today I’ll focus on describing regression models for survival outcomes with functional predictors 12

Slide 13

Slide 13 text

Cox regression models with a functional predictor • 𝜆% 𝑡; 𝒁% , 𝑿% : hazard rate at survival time t • 𝜆& 𝑡 : baseline hazard • 𝒁! "𝜸 : scalar linear predictor • 𝑋! 𝑟 : functional covariate, spatial summary function at radius 𝑟 • 𝐻 𝑋! 𝑟 : generic function of 𝑋% • Estimates association between 𝑋! and 𝜆! , collapses dimension of 𝑋! log 𝜆% 𝑡; 𝑍% , 𝑋% = log 𝜆& 𝑡 + 2 '() * 𝛾' 𝑍%' + 𝐻 𝑋% 𝑟

Slide 14

Slide 14 text

Cox regression models with a functional predictor log 𝜆% 𝑡; 𝑍% , 𝑋% = log 𝜆& 𝑡 + 2 '() * 𝛾' 𝑍%' + 𝐻 𝑋% 𝑟 1. Cox regression with FPC scores, 𝐻 𝑋! 𝑟 : ∑ "#$ %&' 𝛽" 𝑐!" 2. Linear functional Cox model (lfcm), 𝐻 𝑋! 𝑟 : ∫ 𝛽 𝑟 𝑋! 𝑟 𝑑𝑟 3. Additive functional Cox model (afcm), 𝐻 𝑋! 𝑟 : ∫ 𝐹 𝑟, 𝑋% (𝑟) 𝑑𝑟

Slide 15

Slide 15 text

Example with ovarian cancer multiplex imaging data • Outcome is survival from ovarian cancer • 𝑍! is age at baseline • 𝑋! 𝑟 is 𝐺! 𝑟 − 𝐸()* 𝐺! 𝑟 for immune cells in the tumor • 𝑋! 𝑟 > 0 extra probability beyond chance of a neighboring immune cell occurring within radius 𝑟 • Real data modified to increase signal • 𝐺! 𝑟 generated using • mxfda::extract_summary_functions()

Slide 16

Slide 16 text

Functional principal components analysis (FPCA) • FPCA is variation on PCA that involves smooth principal components • extracts interpretable, low-dimensional patterns from these data • Goal is to obtain curve reconstruction: 𝑋! 𝑟 = 𝜇 𝑟 + & "#$ % 𝑐!" 𝜓" 𝑟 + 𝜖! 𝑟 • 𝜇 𝑟 is the population mean • 𝜓# 𝑟 are population-level FPCs • 𝑐!# are subject-specific loadings on the FPCs called “scores” 16

Slide 17

Slide 17 text

Cox regression with Functional Principal Component scores • 𝑋! 𝑡 is decomposed using FPCA • Subject-specific scores then used in a regular Cox model log 𝜆! 𝑡; 𝑍! , 𝑋! = log 𝜆& 𝑡 + & "#$ ' 𝛾" 𝑍!" + & "#$ (')#* 𝛽" 𝑐!" • mxfda::run_fpca() • mxfda::plot() • survival::coxph() 𝑋! 𝑟 = 𝜇 𝑟 + 0 #$% & 𝒄𝒊𝒌 𝜓# 𝑟 + 𝜖! 𝑟

Slide 18

Slide 18 text

Cox regression with FPC scores

Slide 19

Slide 19 text

Linear functional Cox model (lfcm) • 𝐻 𝑋% 𝑡 : ∫ 𝛽 𝑟 𝑋% 𝑟 𝑑𝑟 • 𝛽 𝑟 represented using penalized splines • 𝑒+ , + is the estimated hazard ratio at radius 𝑟 • mxfda::run_fcm(afcm = FALSE) • mxfda::plot() Gellar et al 2015. “Cox regression models with functional covariates for survival data.” Statistical Modelling. log 𝜆! 𝑡; 𝑍!, 𝑋! = log 𝜆" 𝑡 + 7 #$% & 𝛾#𝑍!# + 𝐻 𝑋! 𝑟

Slide 20

Slide 20 text

Linear functional Cox model (lfcm)

Slide 21

Slide 21 text

Additive functional Cox model (afcm) • 𝐻 𝑋% 𝑡 : ∫ 𝐹 𝑟, 𝑋! (𝑟) 𝑑𝑟 • 𝐹 𝑟, 𝑋! (𝑟) represented as penalized tensor product spline surface • mxfda::run_fcm(afcm = TRUE) • mxfda::plot() • Useful model if you believe the relationship between survival and 𝑋! (𝑟) is both nonlinear in 𝑟 and different at each value of 𝑋! Cui, Crainiceanu, Leroux. “Additive functional Cox model.” Journal of Computational and Graphical Statistics. log 𝜆! 𝑡; 𝑍!, 𝑋! = log 𝜆" 𝑡 + 7 #$% & 𝛾#𝑍!# + 𝐻 𝑋! 𝑟

Slide 22

Slide 22 text

Additive functional Cox model (afcm)

Slide 23

Slide 23 text

Takeaways • Cox models with functional predictors model spatial summary functions from multiplex imaging data • More flexible than scalar approaches • Potentially more power • No arbitrary radius cutoff • Three types of models to choose from • Differing levels of flexibility and interpretability

Slide 24

Slide 24 text

Resources 24

Slide 25

Slide 25 text

Resources • VectraPolarisData package • Bioconductor ExperimentHub package • 2 large multiplex imaging datasets from the University of Colorado • Short courses on multiplex imaging • http://juliawrobel.com/MI_tutorial • http://juliawrobel.com/PSB_scProteomics • Website for mxfda package • http://juliawrobel.com/mxfda/ • Three vignettes 25

Slide 26

Slide 26 text

Acknowledgements, and thanks! Colorado SPH Biostatistics • Andrew Leroux • Thao Vu • Debashis Ghosh Moffit Cancer Center • Brooke Fridley • Alex Soupir Contact Info [email protected] juliawrobel.com github.com/julia-wrobel/mxfda 1. Vu, Wrobel, Ghosh. “FunSpace: A functional and spatial analytic approach to cell imaging data using entropy measures.” PLoS Computational Biology, 2023. 2. Vu, Wrobel, Ghosh.”SPF: A spatial and functional data analytic approach to cell imaging data.” PLoS Computational Biology.