3D visualization of STitch3D’s spatiotemporal cell-type deconvolution results
rm(list = ls()) options(warn=-1) library(rgl) library(misc3d) knitr::knit_hooks$set(webgl = hook_webgl)
Load plot3D functions.
source("./plot3D_func.R")
STitch3D infers distributions of cell types in the developing hearts at different time points.
The developing human heart at 4.5-5 post-conception week (PCW)
celltypes <- c("Epicardium.derived.cells", "Fibroblast.like", "Smooth.muscle.cells")
celltype_colors <- c("#d62728", "#e377c2", "#17becf")
um <- c(0.9393488, 0.17483211, 0.29505530, 0,
0.1944310, -0.98017150, -0.03820565, 0,
0.2825249, 0.09325657, -0.95471627, 0,
0, 0, 0, 1) #set the initial view of the 3D plot
spot_radius <- 0.3
axis_rescale <- c(-1,1,2)
alpha_background <- 0.1
plot3D_proportions(directory = "./results_5PCW",
celltypes = celltypes,
celltype_colors = celltype_colors,
um = um,
spot_radius = spot_radius,
axis_rescale = axis_rescale,
alpha_background = alpha_background
)
The developing human heart at 6.5 PCW
um <- c(-0.8227578, -0.5278972, 0.2107004, 0,
-0.5608635, 0.8141541, -0.1502849, 0,
-0.0922074, -0.2418221, -0.9659296, 0,
0, 0, 0, 1) #set the initial view of the 3D plot
plot3D_proportions(directory = "./results_6PCW",
celltypes = celltypes,
celltype_colors = celltype_colors,
um = um,
spot_radius = spot_radius,
axis_rescale = axis_rescale,
alpha_background = alpha_background
)
The developing human heart at 9 PCW
um <- c(0.8148971, -0.1672679, 0.55494523, 0,
0.1549339, 0.9854752, 0.06952617, 0,
-0.5585143, 0.0293229, 0.82897657, 0,
0, 0, 0, 1) #set the initial view of the 3D plot
plot3D_proportions(directory = "./results_9PCW",
celltypes = celltypes,
celltype_colors = celltype_colors,
um = um,
spot_radius = spot_radius,
axis_rescale = axis_rescale,
alpha_background = alpha_background
)