diff --git a/pkgdown.yml b/pkgdown.yml index 464413c..4c1ee53 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -2,7 +2,7 @@ pandoc: 3.1.11 pkgdown: 2.1.1 pkgdown_sha: ~ articles: {} -last_built: 2024-11-13T20:02Z +last_built: 2024-11-13T20:12Z urls: reference: https://mihem.github.io/scMisc/reference article: https://mihem.github.io/scMisc/articles diff --git a/reference/abBoxPlot-1.png b/reference/abBoxPlot-1.png new file mode 100644 index 0000000..4050d66 Binary files /dev/null and b/reference/abBoxPlot-1.png differ diff --git a/reference/abBoxPlot.html b/reference/abBoxPlot.html index c4144d7..b380853 100644 --- a/reference/abBoxPlot.html +++ b/reference/abBoxPlot.html @@ -113,17 +113,67 @@
if (FALSE) { # \dontrun{
+ library(Seurat)
+#> Loading required package: SeuratObject
+#> Loading required package: sp
+#> ‘SeuratObject’ was built under R 4.4.0 but the current version is
+#> 4.4.2; it is recomended that you reinstall ‘SeuratObject’ as the ABI
+#> for R may have changed
+#>
+#> Attaching package: ‘SeuratObject’
+#> The following objects are masked from ‘package:base’:
+#>
+#> intersect, t
+set.seed(123)
+pbmc_small$cluster <- sample(c("Cluster1", "Cluster2"), ncol(pbmc_small), replace = TRUE)
+pbmc_small$sample <- sample(c("CSF_P01", "CSF_P02", "CSF_P03", "CSF_P04"), ncol(pbmc_small), replace = TRUE)
+lookup <-
+ data.frame(
+ sample = c("CSF_P01", "CSF_P02", "CSF_P03", "CSF_P04"),
+ AIE_type = c(rep("control", 2), rep("CASPR2", 2))
+ )
+pbmc_small@meta.data <-
+ pbmc_small@meta.data |>
+ tibble::rownames_to_column("barcode") |>
+ dplyr::left_join(lookup, by = "sample") |>
+ tibble::column_to_rownames("barcode")
abBoxPlot(
- object = aie_pbmc,
+ object = pbmc_small,
cluster_idents = "cluster",
sample = "sample",
- cluster_order = cluster_order,
+ cluster_order = c("Cluster1", "Cluster2"),
group_by = "AIE_type",
- group_order = c("control", "CASPR2", "LGI1"),
- color = my_cols
+ group_order = c("control", "CASPR2"),
+ color = c("control" = "blue", "CASPR2" = "red"),
+ width = 9,
+ height = 6,
+ paired = FALSE,
+ number_of_tests = 3,
+ dir_output = "."
)
-} # }
+#> Joining with `by = join_by(sample)`
+#> Warning: Computation failed in `stat_signif()`.
+#> Caused by error in `$<-.data.frame`:
+#> ! replacement has 1 row, data has 0
+#> `geom_line()`: Each group consists of only one observation.
+#> ℹ Do you need to adjust the group aesthetic?
+#> Warning: Computation failed in `stat_signif()`.
+#> Caused by error in `$<-.data.frame`:
+#> ! replacement has 1 row, data has 0
+#> `geom_line()`: Each group consists of only one observation.
+#> ℹ Do you need to adjust the group aesthetic?
+#> Warning: Computation failed in `stat_signif()`.
+#> Caused by error in `$<-.data.frame`:
+#> ! replacement has 1 row, data has 0
+#> `geom_line()`: Each group consists of only one observation.
+#> ℹ Do you need to adjust the group aesthetic?
+#> Warning: Computation failed in `stat_signif()`.
+#> Caused by error in `$<-.data.frame`:
+#> ! replacement has 1 row, data has 0
+#> `geom_line()`: Each group consists of only one observation.
+#> ℹ Do you need to adjust the group aesthetic?
+
+unlink("boxplot_cluster_pbmc_small_AIE_type.pdf")