STAR, Salmon and Kallisto!

Jialei Duan

2022-01-24



Tyser, R.C.V., Mahammadov, E., Nakanoh, S., Vallier, L., Scialdone, A., and Srinivas, S. (2021). Single-cell transcriptomic characterization of a gastrulating human embryo. Nature 600, 285–289.

  • BioProject Accession: PRJEB40781
  • AEArrayExpress Accession: E-MTAB-9388



Load required packages.

[1] "2022-01-24 19:05:51 CST"

Data preparation

Functions loading

source(
    file = file.path(
        SCRIPT_DIR,
        "utilities.R"
    )
)
plot_embedding_highlight <- function(embedding, x, y, label, n_cols = 3) {
    cell_metadata_selected <- x
    selected_column <- y

    purrr::map(levels(cell_metadata_selected[[selected_column]]), \(x) {
        values <- embedding |>
            dplyr::left_join(cell_metadata_selected) |>
            dplyr::mutate(
                value = case_when(
                    .data[[selected_column]] == x ~ "1",
                    .data[[selected_column]] != x ~ "0"
                )
            ) |>
            dplyr::pull(value) |>
            as.integer() |>
            as.factor()

        plot_embedding(
            embedding = embedding[, c(x_column, y_column)],
            color_values = values,
            label = glue::glue(
                "{label}; ",
                "{x}: {sum(as.integer(as.character(values)), na.rm = TRUE)}"
            ),
            label_position = NULL,
            show_color_value_labels = FALSE,
            show_color_legend = FALSE,
            geom_point_size = GEOM_POINT_SIZE,
            sort_values = TRUE,
            shuffle_values = FALSE,
            rasterise = RASTERISED,
            legend_size = 2
        ) +
            theme_customized(
                legend_key_size = 2,
                legend_text_size = 5
            ) +
            scale_color_manual(
                na.translate = TRUE,
                values = c("grey70", "salmon"),
                na.value = "#7F7F7F"
            ) +
            ggplot2::annotate(
                geom = "text",
                x = Inf,
                y = Inf,
                label = sum(as.integer(as.character(values)), na.rm = TRUE),
                size = 5 / ggplot2::.pt,
                hjust = 1,
                vjust = 1,
                na.rm = FALSE
            )
    }) |>
        purrr::reduce(`+`) +
        patchwork::plot_layout(ncol = n_cols) +
        patchwork::plot_annotation(
            theme = ggplot2::theme(plot.margin = ggplot2::margin())
        )
}

Data loading

PROJECT_DIR <- "/Users/jialei/Dropbox/Data/Projects/UTSW/Peri-implantation"

Matrix

ad <- reticulate::import(module = "anndata", convert = TRUE)
print(ad$`__version__`)
[1] "0.7.6"
adata_files <- purrr::map(c("", "_salmon", "_kallisto"), \(x) {
    file.path(
        PROJECT_DIR,
        "raw",
        "public",
        "PRJEB40781",
        paste0("matrix", x),
        "adata.h5ad"
    )
})
purrr::map_lgl(adata_files, file.exists)
[1] TRUE TRUE TRUE
BACKED <- NULL
matrix_readcount_use <- purrr::map(adata_files, function(x) {
    ad$read_h5ad(
        filename = x, backed = BACKED
    ) |>
        convert_adata()
})
names(matrix_readcount_use) <- c("star", "salmon", "kallisto")

purrr::map_int(matrix_readcount_use, ncol)
    star   salmon kallisto 
    1195     1195     1195 

Metadata

BACKED <- "r"
cell_metadata <- purrr::map(adata_files, function(x) {
    if (stringr::str_detect(x, pattern = "kallisto")) {
        y <- "kallisto"
    } else if (stringr::str_detect(x, pattern = "salmon")) {
        y <- "salmon"
    } else {
        y <- "star"
    }

    ad$read_h5ad(
        filename = x, backed = BACKED
    )$obs |>
        tibble::rownames_to_column(var = "cell") |>
        dplyr::select(cell, everything()) |>
        dplyr::mutate(method = y)
})
names(cell_metadata) <- c("star", "salmon", "kallisto")
purrr::map_int(cell_metadata, nrow)
    star   salmon kallisto 
    1195     1195     1195 

Check memory usage.

purrr::walk(list(matrix_readcount_use, cell_metadata), function(x) {
    print(object.size(x), units = "auto", standard = "SI")
})
203.6 MB
381.5 kB

STAR, Salmon, Kallisto

Cell metadata & embedding

cell_metadata_PRJEB40781 <- vroom::vroom(
    file = file.path(
        PROJECT_DIR,
        "raw",
        "public",
        "PRJEB40781",
        "matrix",
        "cell_metadata.csv"
    )
) |>
    dplyr::mutate(
        lineage = factor(lineage)
    )
EMBEDDING_FILE <- "embedding_ncomponents15_ccc1_seed20210719.csv.gz"

embedding_1195 <- purrr::map(c("star", "salmon", "kallisto"), \(x) {
    vroom::vroom(
        file = file.path(
            PROJECT_DIR,
            "raw/public/PRJEB40781",
            "clustering/PRJEB40781/",
            x,
            "/exploring",
            "Scanpy_Harmony",
            EMBEDDING_FILE
        )
    ) |>
        dplyr::mutate(method = x)
}) |>
    dplyr::bind_rows()
##| column: page

embedding_1195 |> head() |> knitr::kable()
cell batch louvain leiden x_tsne y_tsne x_fitsne y_fitsne x_umap_min_dist=0.5 y_umap_min_dist=0.5 x_umap_min_dist=0.1 y_umap_min_dist=0.1 x_phate y_phate x_pacmap y_pacmap method
ERS5181934 PRJEB40781 0 4 -11.813729 51.55556 -31.9981458 33.08672 -2.8858435 4.266404 -1.4608202 5.649869 -0.0309265 0.0201407 -26.585844 8.177488 star
ERS5181935 PRJEB40781 1 5 -40.629002 26.28880 -1.1851437 42.71939 -1.8841287 12.546277 1.1891274 13.144535 -0.0408448 0.0005910 8.549566 4.448987 star
ERS5181936 PRJEB40781 1 5 -35.980461 17.89327 3.2214120 34.88544 -0.0097796 11.680841 2.3955772 12.497228 -0.0226495 0.0095925 7.491635 2.627760 star
ERS5181937 PRJEB40781 0 4 -7.327799 45.82777 -32.1619202 26.77324 -1.5390446 4.038341 -0.6339243 5.905377 -0.0366031 0.0086555 -26.781113 10.432706 star
ERS5181938 PRJEB40781 0 4 -16.172386 43.02077 -22.0980915 33.24122 -2.4133680 6.631270 -1.9704382 7.099248 -0.0310294 0.0047329 -24.548060 9.166805 star
ERS5181939 PRJEB40781 1 5 -34.458740 20.99207 -0.1236553 35.16477 -0.7037168 11.084229 1.9258376 12.283741 -0.0283207 0.0038721 8.132697 2.670102 star

Visualization

x_column <- "x_umap_min_dist=0.1"
y_column <- "y_umap_min_dist=0.1"

GEOM_POINT_SIZE <- 1.25
EMBEDDING_TITLE_PREFIX <- "UMAP"
RASTERISED <- TRUE

Clustering

cell_metadata |>
    dplyr::bind_rows() |>
    dplyr::group_by(method) |>
    dplyr::summarise(
        num_cells = dplyr::n(),
        median_umis = median(num_umis),
        median_features = median(num_features),
        median_mt_percentage = median(mt_percentage)
    ) |>
    dplyr::mutate(
        method = factor(
            method,
            levels = c("star", "salmon", "kallisto")
        )
    ) |>
    dplyr::arrange(method) |>
    gt::gt()
method num_cells median_umis median_features median_mt_percentage
star 1195 899241 4379 0.008164051
salmon 1195 531492 4500 0.007394771
kallisto 1195 553929 4949 0.007829904
purrr::map(c("star", "salmon", "kallisto"), \(x) {
    plot_embedding(
        embedding = embedding_1195[, c(x_column, y_column, "method")] |>
            dplyr::filter(method == x),
        color_values = embedding_1195$leiden[embedding_1195$method == x]
        |> as.factor(),
        label = paste(
            EMBEDDING_TITLE_PREFIX,
            paste(x, "embedding"),
            paste(x, "clustering"),
            sep = "; "
        ),
        label_position = NULL,
        show_color_value_labels = TRUE,
        show_color_legend = FALSE,
        geom_point_size = GEOM_POINT_SIZE,
        sort_values = FALSE,
        shuffle_values = TRUE,
        rasterise = RASTERISED
    ) +
        theme_customized()
}) |>
    purrr::reduce(`+`) +
    patchwork::plot_layout(ncol = 3) +
    patchwork::plot_annotation(
        theme = ggplot2::theme(plot.margin = ggplot2::margin())
    )

purrr::map(c("star", "salmon", "kallisto"), \(x) {
    embedding_star <- embedding_1195[, c(
        x_column, y_column,
        "method", "cell", "leiden"
    )] |>
        dplyr::filter(method == "star")

    values <- embedding_1195[, c(
        x_column, y_column,
        "method", "leiden", "cell"
    )] |>
        dplyr::filter(method == x) |>
        dplyr::left_join(
            embedding_star |> dplyr::select(cell, leiden_star = leiden)
        ) |>
        dplyr::pull(leiden_star)

    plot_embedding(
        embedding = embedding_1195[, c(x_column, y_column, "method")] |>
            dplyr::filter(method == x),
        color_values = values
        |> as.factor(),
        label = paste(
            EMBEDDING_TITLE_PREFIX,
            paste(x, "embedding"),
            "star clustering",
            sep = "; "
        ),
        label_position = NULL,
        show_color_value_labels = TRUE,
        show_color_legend = FALSE,
        geom_point_size = GEOM_POINT_SIZE,
        sort_values = FALSE,
        shuffle_values = TRUE,
        rasterise = RASTERISED
    ) +
        theme_customized()
}) |>
    purrr::reduce(`+`) +
    patchwork::plot_layout(ncol = 3) +
    patchwork::plot_annotation(
        theme = ggplot2::theme(plot.margin = ggplot2::margin())
    )

Expression

purrr::map(c("star", "salmon", "kallisto"), \(x) {
    plot_embedding(
        embedding = embedding_1195[, c(x_column, y_column, "method")] |>
            dplyr::filter(method == x),
        color_values = embedding_1195[, c("method", "cell")] |>
            dplyr::filter(method == x) |>
            dplyr::left_join(
                cell_metadata[[x]]
            ) |>
            dplyr::pull(num_umis) |>
            {
                \(x) log10(x)
            }(),
        label = paste(
            EMBEDDING_TITLE_PREFIX,
            paste(x, "embedding"),
            "UMI",
            sep = "; "
        ),
        label_position = NULL,
        show_color_value_labels = FALSE,
        show_color_legend = TRUE,
        geom_point_size = GEOM_POINT_SIZE / 1.5,
        sort_values = TRUE,
        shuffle_values = FALSE,
        rasterise = RASTERISED,
        legend_size = 2
    ) +
        theme_customized(
            legend_key_size = 2,
            legend_text_size = 5
        )
}) |>
    purrr::reduce(`+`) +
    patchwork::plot_layout(ncol = 3) +
    patchwork::plot_annotation(
        theme = ggplot2::theme(plot.margin = ggplot2::margin())
    )

FEATURES_SELECTED <- c(
    "ENSG00000204531_POU5F1",
    #
    "ENSG00000164736_SOX17",
    #
    "ENSG00000179348_GATA2"
)
purrr::map(FEATURES_SELECTED, \(y) {
    selected_feature <- y

    purrr::map(c("star", "salmon", "kallisto"), \(x) {
        values <- log10(
            calc_cpm(
                matrix_readcount_use[[x]][
                    ,
                    embedding_1195$cell[embedding_1195$method == x]
                ]
            )[selected_feature, ] + 1
        )

        plot_embedding(
            embedding = embedding_1195[, c(x_column, y_column, "method")] |>
                dplyr::filter(method == x),
            color_values = values,
            label = paste(
                EMBEDDING_TITLE_PREFIX,
                paste(x, "embedding"),
                x,
                selected_feature |> stringr::str_remove(pattern = "^.+_"),
                sep = "; "
            ),
            label_position = NULL,
            show_color_value_labels = FALSE,
            show_color_legend = TRUE,
            geom_point_size = GEOM_POINT_SIZE / 1.5,
            sort_values = TRUE,
            shuffle_values = FALSE,
            rasterise = RASTERISED,
            legend_size = 2
        ) +
            theme_customized(
                legend_key_size = 2,
                legend_text_size = 5
            )
    })
}) |>
    unlist(recursive = FALSE) |>
    purrr::reduce(`+`) +
    patchwork::plot_layout(ncol = 3) +
    patchwork::plot_annotation(
        theme = ggplot2::theme(plot.margin = ggplot2::margin())
    )

purrr::map(FEATURES_SELECTED, \(y) {
    selected_feature <- y

    embedding_star <- embedding_1195[, c(
        x_column, y_column,
        "method", "cell", "leiden"
    )] |>
        dplyr::filter(method == "star")

    purrr::map(c("star", "salmon", "kallisto"), \(x) {
        values <- log10(
            calc_cpm(
                matrix_readcount_use[[x]][, embedding_star$cell]
            )[selected_feature, ] + 1
        )

        plot_embedding(
            embedding = embedding_star,
            color_values = values,
            label = paste(
                EMBEDDING_TITLE_PREFIX,
                "star embedding",
                x,
                selected_feature |> stringr::str_remove(pattern = "^.+_"),
                sep = "; "
            ),
            label_position = NULL,
            show_color_value_labels = FALSE,
            show_color_legend = TRUE,
            geom_point_size = GEOM_POINT_SIZE / 1.5,
            sort_values = TRUE,
            shuffle_values = FALSE,
            rasterise = RASTERISED,
            legend_size = 2
        ) +
            theme_customized(
                legend_key_size = 2,
                legend_text_size = 5
            )
    })
}) |>
    unlist(recursive = FALSE) |>
    purrr::reduce(`+`) +
    patchwork::plot_layout(ncol = 3) +
    patchwork::plot_annotation(
        theme = ggplot2::theme(plot.margin = ggplot2::margin())
    )

FEATURES_SELECTED <- c(
    "ENSG00000204531_POU5F1",
    "ENSG00000111704_NANOG",
    "ENSG00000171872_KLF17",
    "ENSG00000186103_ARGFX",
    #
    "ENSG00000164736_SOX17",
    "ENSG00000125798_FOXA2",
    "ENSG00000136574_GATA4",
    "ENSG00000134853_PDGFRA",
    #
    "ENSG00000179348_GATA2",
    "ENSG00000070915_SLC12A3",
    "ENSG00000165556_CDX2",
    "ENSG00000007866_TEAD3"
)

plot_violin(
    cells = embedding_1195 |>
        split(~method) |>
        purrr::map(
            \(x) {
                x |> dplyr::mutate(cell = paste(method, cell, sep = "_"))
            } |>
                dplyr::pull(cell)
        ) |>
        {
            \(x) x[c("star", "salmon", "kallisto")]
        }(),
    features = FEATURES_SELECTED,
    matrix_cpm = calc_cpm(purrr::map(names(matrix_readcount_use), \(x) {
        colnames(matrix_readcount_use[[x]]) <-
            paste(x,
                colnames(matrix_readcount_use[[x]]),
                sep = "_"
            )
        return(matrix_readcount_use[[x]])
    }) |>
        purrr::reduce(cbind)),
    y_title = "Aligner/Mapper",
    strip_text_size = 6
) +
    theme_grey(base_size = 6) %+replace%
    ggplot2::theme(
        axis.title.y = ggplot2::element_text(
            family = "Arial",
            size = 6,
            angle = 90,
            margin = ggplot2::margin(
                t = 0, r = 1, b = 0, l = 0,
                unit = "mm"
            )
        ),
    )

pairs <- combn(c("star", "salmon", "kallisto"), 2)

purrr::map(seq_len(ncol(pairs)), \(x) {
    aa <- pairs[, x, drop = TRUE][1]
    bb <- pairs[, x, drop = TRUE][2]

    a <- rowMeans(calc_cpm(matrix_readcount_use[[aa]]))
    b <- rowMeans(calc_cpm(matrix_readcount_use[[bb]]))

    a <- log10(a + 1)
    b <- log10(b + 1)
    corr <- cor(a, b, method = "spearman")

    ggplot2::ggplot(
        data = NULL,
        ggplot2::aes(
            x = a,
            y = b
        )
    ) +
        # geom_point() +
        ggpointdensity::geom_pointdensity(alpha = 0.3, na.rm = TRUE) +
        ggplot2::scale_x_continuous(
            name = glue::glue(
                "<span style='color:red'>**{aa}**</span>; ",
                "log<sub>10</sub> CPM + 1"
            )
        ) +
        ggplot2::scale_y_continuous(
            name = glue::glue(
                "<span style='color:red'>**{bb}**</span>; ",
                "log<sub>10</sub> CPM + 1"
            )
        ) +
        ggplot2::coord_fixed() +
        ggplot2::geom_abline(color = "salmon") +
        ggplot2::labs(color = "Density") +
        ggplot2::theme_bw(base_size = 6) %+replace%
        ggplot2::theme(
            axis.title.x = ggtext::element_markdown(
                # axis.title = ggtext::element_textbox(
                family = "Arial",
                size = 7,
                margin = ggplot2::margin(
                    t = 1, r = 0, b = 0, l = 0,
                    unit = "mm"
                )
            ),
            axis.title.y = ggtext::element_markdown(
                family = "Arial",
                size = 7,
                angle = 90,
                margin = ggplot2::margin(
                    t = 0, r = 1, b = 0, l = 0,
                    unit = "mm"
                )
            ),
            #
            legend.background = ggplot2::element_blank(),
            legend.margin = ggplot2::margin(
                t = 0, r = 0, b = 0, l = 0, unit = "mm"
            ),
            legend.key = ggplot2::element_blank(),
            legend.key.size = grid::unit(2, "mm"),
            legend.text = ggplot2::element_text(
                family = "Arial",
                size = 5,
                margin = ggplot2::margin(
                    t = 0, r = 0, b = 0, l = -0.5,
                    unit = "mm"
                )
            ),
            #
            legend.position = c(0.825, 0.3),
            legend.justification = c(0, 1)
        ) +
        ggtext::geom_richtext(
            ggplot2::aes(
                x = 0,
                y = 4
            ),
            label = paste("***ρ*** =", round(corr, 3)),
            fill = NA,
            family = "Arial",
            size = 5 / ggplot2::.pt,
            hjust = 0,
            vjust = 1
        )
}) |>
    purrr::reduce(`+`) +
    patchwork::plot_layout(nrow = 1) +
    patchwork::plot_annotation(
        theme = ggplot2::theme(plot.margin = ggplot2::margin())
    )


R session info

devtools::session_info()
─ Session info ───────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.1.2 (2021-11-01)
 os       macOS Monterey 12.1
 system   aarch64, darwin20.6.0
 ui       unknown
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       America/Chicago
 date     2022-01-24
 pandoc   2.17.0.1 @ /opt/homebrew/bin/ (via rmarkdown)

─ Packages ───────────────────────────────────────────────────────────────────
 package        * version     date (UTC) lib source
 assertthat       0.2.1       2019-03-21 [1] CRAN (R 4.1.1)
 backports        1.4.1       2021-12-13 [1] CRAN (R 4.1.2)
 beeswarm         0.4.0       2021-06-01 [1] CRAN (R 4.1.2)
 bit              4.0.4       2020-08-04 [1] CRAN (R 4.1.1)
 bit64            4.0.5       2020-08-30 [1] CRAN (R 4.1.1)
 brio             1.1.3       2021-11-30 [1] CRAN (R 4.1.2)
 broom            0.7.11      2022-01-03 [1] CRAN (R 4.1.2)
 cachem           1.0.6       2021-08-19 [1] CRAN (R 4.1.1)
 callr            3.7.0       2021-04-20 [1] CRAN (R 4.1.1)
 cellranger       1.1.0       2016-07-27 [1] CRAN (R 4.1.1)
 checkmate        2.0.0       2020-02-06 [1] CRAN (R 4.1.1)
 cli              3.1.1       2022-01-20 [1] CRAN (R 4.1.2)
 colorspace       2.0-2       2021-06-24 [1] CRAN (R 4.1.1)
 crayon           1.4.2       2021-10-29 [1] CRAN (R 4.1.1)
 data.table       1.14.2      2021-09-27 [1] CRAN (R 4.1.1)
 DBI              1.1.2       2021-12-20 [1] CRAN (R 4.1.2)
 dbplyr           2.1.1       2021-04-06 [1] CRAN (R 4.1.1)
 desc             1.4.0       2021-09-28 [1] CRAN (R 4.1.1)
 devtools         2.4.3.9000  2022-01-22 [1] Github (r-lib/devtools@41280ac)
 digest           0.6.29      2021-12-01 [1] CRAN (R 4.1.2)
 dplyr          * 1.0.7.9000  2022-01-12 [1] Github (tidyverse/dplyr@0501335)
 dtplyr           1.2.1       2022-01-19 [1] CRAN (R 4.1.2)
 ellipsis         0.3.2       2021-04-29 [1] CRAN (R 4.1.1)
 evaluate         0.14        2019-05-28 [1] CRAN (R 4.1.1)
 extrafont      * 0.17        2014-12-08 [1] CRAN (R 4.1.1)
 extrafontdb      1.0         2012-06-11 [1] CRAN (R 4.1.1)
 fansi            1.0.2       2022-01-14 [1] CRAN (R 4.1.2)
 farver           2.1.0       2021-02-28 [1] CRAN (R 4.1.1)
 fastmap          1.1.0       2021-01-25 [1] CRAN (R 4.1.1)
 forcats        * 0.5.1.9000  2021-11-29 [1] Github (tidyverse/forcats@b4dade0)
 fs               1.5.2.9000  2021-12-09 [1] Github (r-lib/fs@6d1182f)
 gargle           1.2.0       2021-07-02 [1] CRAN (R 4.1.1)
 generics         0.1.1       2021-10-25 [1] CRAN (R 4.1.1)
 ggbeeswarm       0.6.0       2017-08-07 [1] CRAN (R 4.1.2)
 ggplot2        * 3.3.5       2021-06-25 [1] CRAN (R 4.1.1)
 ggpointdensity   0.1.0       2021-11-14 [1] Github (LKremer/ggpointdensity@02f3ab2)
 ggrastr          1.0.1       2021-12-08 [1] Github (VPetukhov/ggrastr@7aed9af)
 ggtext           0.1.1       2022-01-21 [1] Github (wilkelab/ggtext@50fdaba)
 glue             1.6.1.9000  2022-01-23 [1] Github (tidyverse/glue@3da70df)
 googledrive      2.0.0       2021-07-08 [1] CRAN (R 4.1.1)
 googlesheets4    1.0.0       2021-07-21 [1] CRAN (R 4.1.1)
 gridtext         0.1.4       2020-12-10 [1] CRAN (R 4.1.2)
 gt               0.3.1.9000  2022-01-17 [1] Github (rstudio/gt@fcabb41)
 gtable           0.3.0.9000  2021-10-28 [1] Github (r-lib/gtable@a0bd272)
 haven            2.4.3       2021-08-04 [1] CRAN (R 4.1.1)
 highr            0.9         2021-04-16 [1] CRAN (R 4.1.1)
 hms              1.1.1       2021-09-26 [1] CRAN (R 4.1.1)
 htmltools        0.5.2       2021-08-25 [1] CRAN (R 4.1.1)
 htmlwidgets      1.5.4       2021-09-08 [1] CRAN (R 4.1.1)
 httr             1.4.2       2020-07-20 [1] CRAN (R 4.1.1)
 jsonlite         1.7.3       2022-01-17 [1] CRAN (R 4.1.2)
 knitr            1.37.1      2021-12-21 [1] https://yihui.r-universe.dev (R 4.1.2)
 labeling         0.4.2       2020-10-20 [1] CRAN (R 4.1.1)
 lattice          0.20-45     2021-09-22 [2] CRAN (R 4.1.2)
 lifecycle        1.0.1       2021-09-24 [1] CRAN (R 4.1.1)
 lubridate        1.8.0       2022-01-20 [1] Github (tidyverse/lubridate@566590f)
 magrittr         2.0.1       2020-11-17 [1] CRAN (R 4.1.1)
 markdown         1.1         2019-08-07 [1] CRAN (R 4.1.2)
 MASS             7.3-55      2022-01-13 [2] CRAN (R 4.1.2)
 Matrix         * 1.4-0       2021-12-08 [2] CRAN (R 4.1.2)
 memoise          2.0.1       2021-11-26 [1] CRAN (R 4.1.2)
 modelr           0.1.8.9000  2021-10-27 [1] Github (tidyverse/modelr@16168e0)
 munsell          0.5.0       2018-06-12 [1] CRAN (R 4.1.1)
 patchwork      * 1.1.0.9000  2021-10-27 [1] Github (thomasp85/patchwork@79223d3)
 pillar           1.6.4       2021-10-18 [1] CRAN (R 4.1.1)
 pkgbuild         1.3.1       2021-12-20 [1] CRAN (R 4.1.2)
 pkgconfig        2.0.3       2019-09-22 [1] CRAN (R 4.1.1)
 pkgload          1.2.4       2021-11-30 [1] CRAN (R 4.1.2)
 png              0.1-7       2013-12-03 [1] CRAN (R 4.1.1)
 prettyunits      1.1.1       2020-01-24 [1] CRAN (R 4.1.1)
 processx         3.5.2       2021-04-30 [1] CRAN (R 4.1.1)
 ps               1.6.0       2021-02-28 [1] CRAN (R 4.1.1)
 purrr          * 0.3.4       2020-04-17 [1] CRAN (R 4.1.1)
 R.cache          0.15.0      2021-04-30 [1] CRAN (R 4.1.1)
 R.methodsS3      1.8.1       2020-08-26 [1] CRAN (R 4.1.1)
 R.oo             1.24.0      2020-08-26 [1] CRAN (R 4.1.1)
 R.utils          2.11.0      2021-09-26 [1] CRAN (R 4.1.1)
 R6               2.5.1.9000  2021-12-09 [1] Github (r-lib/R6@1b05b89)
 ragg             1.2.1.9000  2021-12-08 [1] Github (r-lib/ragg@c68c666)
 Rcpp             1.0.8       2022-01-13 [1] CRAN (R 4.1.2)
 readr          * 2.1.1       2021-11-30 [1] CRAN (R 4.1.2)
 readxl           1.3.1.9000  2022-01-20 [1] Github (tidyverse/readxl@2ccb82c)
 remotes          2.4.2       2022-01-24 [1] Github (r-lib/remotes@7b0ee01)
 reprex           2.0.1       2021-08-05 [1] CRAN (R 4.1.1)
 reticulate       1.23        2022-01-14 [1] CRAN (R 4.1.2)
 rlang            1.0.0       2022-01-20 [1] Github (r-lib/rlang@f2fbaad)
 rmarkdown        2.11.12     2022-01-24 [1] Github (rstudio/rmarkdown@b53a7ce)
 rprojroot        2.0.2       2020-11-15 [1] CRAN (R 4.1.1)
 rstudioapi       0.13.0-9000 2022-01-15 [1] Github (rstudio/rstudioapi@5d0f087)
 Rttf2pt1         1.3.9       2021-07-22 [1] CRAN (R 4.1.1)
 rvest            1.0.2       2021-10-16 [1] CRAN (R 4.1.1)
 sass             0.4.0       2021-05-12 [1] CRAN (R 4.1.1)
 scales           1.1.1       2020-05-11 [1] CRAN (R 4.1.1)
 sessioninfo      1.2.2       2021-12-06 [1] CRAN (R 4.1.2)
 stringi          1.7.6       2021-11-29 [1] CRAN (R 4.1.2)
 stringr        * 1.4.0.9000  2022-01-24 [1] Github (tidyverse/stringr@85f6140)
 styler         * 1.6.2.9000  2022-01-17 [1] Github (r-lib/styler@9274aed)
 systemfonts      1.0.3.9000  2021-12-07 [1] Github (r-lib/systemfonts@414114e)
 testthat         3.1.2.9000  2022-01-21 [1] Github (r-lib/testthat@54b9db2)
 textshaping      0.3.6       2021-10-13 [1] CRAN (R 4.1.1)
 tibble         * 3.1.6.9000  2022-01-18 [1] Github (tidyverse/tibble@7aa54e6)
 tidyr          * 1.1.4       2021-09-27 [1] CRAN (R 4.1.1)
 tidyselect       1.1.1       2021-04-30 [1] CRAN (R 4.1.1)
 tidyverse      * 1.3.1.9000  2021-12-08 [1] Github (tidyverse/tidyverse@6186fbf)
 tzdb             0.2.0       2021-10-27 [1] CRAN (R 4.1.1)
 usethis          2.1.5.9000  2022-01-20 [1] Github (r-lib/usethis@57b109a)
 utf8             1.2.2       2021-07-24 [1] CRAN (R 4.1.1)
 vctrs            0.3.8       2021-04-29 [1] CRAN (R 4.1.1)
 vipor            0.4.5       2017-03-22 [1] CRAN (R 4.1.2)
 viridisLite      0.4.0       2021-04-13 [1] CRAN (R 4.1.1)
 vroom            1.5.7       2021-11-30 [1] CRAN (R 4.1.2)
 withr            2.4.3       2021-11-30 [1] CRAN (R 4.1.2)
 xfun             0.29        2021-12-14 [1] CRAN (R 4.1.2)
 xml2             1.3.3       2021-11-30 [1] CRAN (R 4.1.2)
 yaml             2.2.1       2020-02-01 [1] CRAN (R 4.1.1)

 [1] /opt/homebrew/lib/R/4.1/site-library
 [2] /opt/homebrew/Cellar/r/4.1.2/lib/R/library

─ Python configuration ───────────────────────────────────────────────────────
 python:         /Users/jialei/.pyenv/shims/python
 libpython:      /Users/jialei/.pyenv/versions/miniforge3-4.10.1-5/lib/libpython3.9.dylib
 pythonhome:     /Users/jialei/.pyenv/versions/miniforge3-4.10.1-5:/Users/jialei/.pyenv/versions/miniforge3-4.10.1-5
 version:        3.9.5 | packaged by conda-forge | (default, Jun 19 2021, 00:24:55)  [Clang 11.1.0 ]
 numpy:          /Users/jialei/.pyenv/versions/miniforge3-4.10.1-5/lib/python3.9/site-packages/numpy
 numpy_version:  1.20.3
 anndata:        /Users/jialei/.pyenv/versions/miniforge3-4.10.1-5/lib/python3.9/site-packages/anndata
 
 NOTE: Python version was forced by RETICULATE_PYTHON

──────────────────────────────────────────────────────────────────────────────