@@ -239,24 +239,18 @@ sce_modeling_results <- registration_wrapper(
239239```
240240
241241## Extract Enrichment t-statistics
242- ``` {r "extract_t_stats"}
243- ## extract t-statics and rename
244- registration_t_stats <- sce_modeling_results$enrichment[, grep("^t_stat", colnames(sce_modeling_results$enrichment))]
245- colnames(registration_t_stats) <- gsub("^t_stat_", "", colnames(registration_t_stats))
246-
247- ## cell types x gene
248- dim(registration_t_stats)
249242
250- ## check out table
251- registration_t_stats[1:5, 1:5]
243+ ``` {r "extract_t_stats"}
244+ ## check out table on enrichment t-statistics
245+ sce_modeling_results$enrichment[1:5, 1:5]
252246```
253247
254248
255249## Correlate statsics with Layer Reference
256250
257251``` {r "layer_stat_cor"}
258252cor_layer <- layer_stat_cor(
259- stats = registration_t_stats ,
253+ stats = sce_modeling_results$enrichment ,
260254 modeling_results = layer_modeling_results,
261255 model_type = "enrichment",
262256 top_n = 100
@@ -301,6 +295,22 @@ anno <- annotate_registered_clusters(
301295anno
302296```
303297
298+ ## Plot Annotated Cell Types
299+
300+ Finally, we can update our heatmap with colors and annotations based on cluster
301+ registration for the snRNA-seq clusters.
302+
303+ ``` {r "plot_anno"}
304+ layer_stat_cor_plot(
305+ cor_layer,
306+ query_colors = get_colors(clusters = rownames(cor_layer)),
307+ reference_colors = libd_layer_colors,
308+ annotation = anno,
309+ cluster_rows = FALSE,
310+ cluster_columns = FALSE
311+ )
312+ ```
313+
304314
305315# Reproducibility
306316
0 commit comments