# Gallery of mascarade-generaded masks

### Loading necessary libraries

    library(mascarade)
    library(data.table)
    library(ggplot2)
    library(ggsci)

### PBMC-3K UMAP

    example <- readRDS(url("https://alserglab.wustl.edu/files/mascarade/examples/pbmc3k_umap.rds"))
    data <- data.table(example$dims,
                       cluster=example$clusters)

    maskTable <- generateMask(dims=example$dims,
                              clusters=example$clusters)

    ggplot(data, aes(x=UMAP_1, y=UMAP_2)) +
        geom_point(aes(color=cluster)) +
        geom_path(data=maskTable, aes(group=group)) +
        coord_fixed() +
        theme_classic()

### PBMC-3K t-SNE

    example <- readRDS(url("https://alserglab.wustl.edu/files/mascarade/examples/pbmc3k_tsne.rds"))
    data <- data.table(example$dims,
                       cluster=example$clusters)

    maskTable <- generateMask(dims=example$dims,
                              clusters=example$clusters)

    ggplot(data, aes(x=tSNE_1, y=tSNE_2)) +
        geom_point(aes(color=cluster)) +
        geom_path(data=maskTable, aes(group=group)) +
        coord_fixed() +
        theme_classic()

### Aya

    example <- readRDS(url("https://alserglab.wustl.edu/files/mascarade/examples/aya.rds"))
    data <- data.table(example$dims,
                       cluster=example$clusters)

    maskTable <- generateMask(dims=example$dims,
                              clusters=example$clusters)

    ggplot(data, aes(x=UMAP_1, y=UMAP_2)) +
        geom_point(aes(color=cluster), size=0.5) +
        geom_path(data=maskTable, aes(group=group)) +
        coord_fixed() +
        theme_classic()

### Chia-Jung

    example <- readRDS(url("https://alserglab.wustl.edu/files/mascarade/examples/chiajung1.rds"))
    data <- data.table(example$dims,
                       cluster=example$clusters)

    maskTable <- generateMask(dims=example$dims,
                              clusters=example$clusters)

    ggplot(data, aes(x=UMAP_1, y=UMAP_2)) +
        geom_point(aes(color=cluster), size=0.1) +
        scale_color_ucscgb() +
        geom_path(data=maskTable, aes(group=group)) +
        coord_fixed() +
        theme_classic()

    example <- readRDS(url("https://alserglab.wustl.edu/files/mascarade/examples/chiajung2.rds"))
    data <- data.table(example$dims,
                       cluster=example$clusters)

    maskTable <- generateMask(dims=example$dims,
                              clusters=example$clusters)

    ggplot(data, aes(x=UMAP_1, y=UMAP_2)) +
        geom_point(aes(color=cluster)) +
        geom_path(data=maskTable, aes(group=group)) +
        coord_fixed() +
        theme_classic()

### Session info

    sessionInfo()

    ## R version 4.5.1 (2025-06-13)
    ## Platform: x86_64-pc-linux-gnu
    ## Running under: Debian GNU/Linux 13 (trixie)
    ##
    ## Matrix products: default
    ## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
    ## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.21.so;  LAPACK version 3.11.0
    ##
    ## locale:
    ##  [1] LC_CTYPE=C.utf8       LC_NUMERIC=C          LC_TIME=C.utf8
    ##  [4] LC_COLLATE=C          LC_MONETARY=C.utf8    LC_MESSAGES=C.utf8
    ##  [7] LC_PAPER=C.utf8       LC_NAME=C             LC_ADDRESS=C
    ## [10] LC_TELEPHONE=C        LC_MEASUREMENT=C.utf8 LC_IDENTIFICATION=C
    ##
    ## time zone: US/Central
    ## tzcode source: system (glibc)
    ##
    ## attached base packages:
    ## [1] stats     graphics  grDevices utils     datasets  methods   base
    ##
    ## other attached packages:
    ## [1] ggsci_4.2.0       ggplot2_4.0.1     data.table_1.18.0 mascarade_0.3.1
    ##
    ## loaded via a namespace (and not attached):
    ##  [1] sass_0.4.10            generics_0.1.4         spatstat.explore_3.6-0
    ##  [4] tensor_1.5.1           spatstat.data_3.1-9    lattice_0.22-7
    ##  [7] digest_0.6.39          magrittr_2.0.4         spatstat.utils_3.2-0
    ## [10] evaluate_1.0.5         grid_4.5.1             RColorBrewer_1.1-3
    ## [13] fastmap_1.2.0          jsonlite_2.0.0         Matrix_1.7-4
    ## [16] spatstat.sparse_3.1-0  scales_1.4.0           tweenr_2.0.3
    ## [19] jquerylib_0.1.4        abind_1.4-8            cli_3.6.5
    ## [22] rlang_1.1.6            polyclip_1.10-7        withr_3.0.2
    ## [25] cachem_1.1.0           yaml_2.3.12            otel_0.2.0
    ## [28] spatstat.univar_3.1-5  tools_4.5.1            deldir_2.0-4
    ## [31] dplyr_1.1.4            spatstat.geom_3.6-1    vctrs_0.6.5
    ## [34] R6_2.6.1               lifecycle_1.0.4        MASS_7.3-65
    ## [37] pkgconfig_2.0.3        pillar_1.11.1          bslib_0.9.0
    ## [40] gtable_0.3.6           glue_1.8.0             ggforce_0.5.0
    ## [43] xfun_0.55              tibble_3.3.0           tidyselect_1.2.1
    ## [46] knitr_1.51             goftest_1.2-3          farver_2.1.2
    ## [49] htmltools_0.5.9        spatstat.random_3.4-3  nlme_3.1-168
    ## [52] labeling_0.4.3         rmarkdown_2.30         compiler_4.5.1
    ## [55] S7_0.2.1