From d434c7a8a08cd78f1b3d9cb70e3504aab5c9c25f Mon Sep 17 00:00:00 2001 From: Ally Hawkins <54039191+allyhawkins@users.noreply.github.com> Date: Fri, 1 Sep 2023 11:06:10 -0400 Subject: [PATCH] add median line --- .../04-cell-assign-delta-median.nb.html | 63 +++++++++++-------- .../utils/cellassign-helper-functions.R | 1 + 2 files changed, 37 insertions(+), 27 deletions(-) diff --git a/celltype_annotation/analysis/04-cell-assign-delta-median.nb.html b/celltype_annotation/analysis/04-cell-assign-delta-median.nb.html index 22f06f5..94f3cc2 100644 --- a/celltype_annotation/analysis/04-cell-assign-delta-median.nb.html +++ b/celltype_annotation/analysis/04-cell-assign-delta-median.nb.html @@ -3049,11 +3049,12 @@
$all_cells
-
-Picking joint bandwidth of 1.78e-05
+
+Picking joint bandwidth of 1.78e-05
+Picking joint bandwidth of 1.78e-05
-
+
@@ -3062,8 +3063,11 @@ Blood probability
Picking joint bandwidth of 3.77e-06
+
+Picking joint bandwidth of 3.77e-06
+
-
+
@@ -3080,11 +3084,12 @@ RMS probability
$combined_muscle
-
-Picking joint bandwidth of 0.0211
+
+Picking joint bandwidth of 0.0211
+Picking joint bandwidth of 0.0211
-
+
@@ -3093,8 +3098,11 @@ RMS probability
Picking joint bandwidth of 0.00587
+
+Picking joint bandwidth of 0.00587
+
-
+
@@ -3201,7 +3209,7 @@ Blood median delta
plot_median_delta(blood_results_df, color_group = reference)
-
+
@@ -3212,7 +3220,7 @@ Blood median delta
plot_median_delta(blood_results_df)
-
+
@@ -3241,7 +3249,7 @@ $combined_muscle
-
+
$rms_markers
-
+
@@ -3303,7 +3311,7 @@ sessionInfo()
-
+
R version 4.2.1 (2022-06-23)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Ventura 13.5
@@ -3315,7 +3323,8 @@ Session Info
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
-[1] stats4 stats graphics grDevices datasets utils methods base
+[1] stats4 stats graphics grDevices datasets utils methods
+[8] base
other attached packages:
[1] ggplot2_3.3.6 SingleCellExperiment_1.18.0
@@ -3345,18 +3354,18 @@ Session Info
[49] Matrix_1.6-1 Rcpp_1.0.9 munsell_0.5.0
[52] fansi_1.0.3 lifecycle_1.0.3 stringi_1.7.8
[55] yaml_2.3.5 MASS_7.3-58.1 zlibbioc_1.42.0
-[58] plyr_1.8.7 flexmix_2.3-18 grid_4.2.1
-[61] parallel_4.2.1 crayon_1.5.1 lattice_0.20-45
-[64] splines_4.2.1 circlize_0.4.15 hms_1.1.1
-[67] knitr_1.39 ComplexHeatmap_2.12.1 pillar_1.9.0
-[70] igraph_1.3.4 rjson_0.2.21 codetools_0.2-18
-[73] glue_1.6.2 evaluate_0.16 renv_0.15.5
-[76] BiocManager_1.30.18 png_0.1-7 vctrs_0.6.3
-[79] tzdb_0.4.0 tweenr_2.0.2 foreach_1.5.2
-[82] gtable_0.3.0 purrr_1.0.2 polyclip_1.10-0
-[85] tidyr_1.2.0 clue_0.3-64 cachem_1.0.6
-[88] xfun_0.32 ggforce_0.3.4 miQC_1.4.0
-[91] rsconnect_1.0.1 tibble_3.2.1 pheatmap_1.0.12
+[58] flexmix_2.3-18 plyr_1.8.7 grid_4.2.1
+[61] parallel_4.2.1 forcats_0.5.2 crayon_1.5.1
+[64] lattice_0.20-45 splines_4.2.1 circlize_0.4.15
+[67] hms_1.1.1 knitr_1.39 ComplexHeatmap_2.12.1
+[70] pillar_1.9.0 igraph_1.3.4 rjson_0.2.21
+[73] codetools_0.2-18 glue_1.6.2 evaluate_0.16
+[76] renv_0.15.5 BiocManager_1.30.18 png_0.1-7
+[79] vctrs_0.6.3 tzdb_0.4.0 tweenr_2.0.2
+[82] foreach_1.5.2 gtable_0.3.0 purrr_1.0.2
+[85] polyclip_1.10-0 tidyr_1.2.0 clue_0.3-64
+[88] cachem_1.0.6 xfun_0.32 ggforce_0.3.4
+[91] miQC_1.4.0 tibble_3.2.1 pheatmap_1.0.12
[94] iterators_1.0.14 cluster_2.1.3 bluster_1.6.0
[97] ellipsis_0.3.2
diff --git a/celltype_annotation/utils/cellassign-helper-functions.R b/celltype_annotation/utils/cellassign-helper-functions.R
index 1bab92e..58baf21 100644
--- a/celltype_annotation/utils/cellassign-helper-functions.R
+++ b/celltype_annotation/utils/cellassign-helper-functions.R
@@ -170,6 +170,7 @@ plot_probability <- function(celltype_assignments,
purrr::imap(\(plot_df, ref_name) {
ggplot(plot_df, aes(x = probability, y = celltype, fill = assigned_celltype)) +
ggridges::geom_density_ridges(alpha = 0.5) +
+ ggridges::stat_density_ridges(quantile_lines = TRUE, quantiles = 2) +
theme_bw() +
guides(x = guide_axis(angle = 90),
colour = guide_legend(override.aes = list(size = 2, alpha = 1))) +