Overview of the tidySingleCellExperiment package

Stefano Mangiola

2023-04-25

Introduction

tidySingleCellExperiment provides a bridge between Bioconductor single-cell packages [@amezquita2019orchestrating] and the tidyverse [@wickham2019welcome]. It creates an invisible layer that enables viewing the Bioconductor SingleCellExperiment object as a tidyverse tibble, and provides SingleCellExperiment-compatible dplyr, tidyr, ggplot and plotly functions. This allows users to get the best of both Bioconductor and tidyverse worlds.

Functions/utilities available

SingleCellExperiment-compatible Functions Description
all After all tidySingleCellExperiment is a SingleCellExperiment object, just better
tidyverse Packages Description
dplyr All dplyr tibble functions (e.g. tidySingleCellExperiment::select)
tidyr All tidyr tibble functions (e.g. tidySingleCellExperiment::pivot_longer)
ggplot2 ggplot (tidySingleCellExperiment::ggplot)
plotly plot_ly (tidySingleCellExperiment::plot_ly)
Utilities Description
tidy Add tidySingleCellExperiment invisible layer over a SingleCellExperiment object
as_tibble Convert cell-wise information to a tbl_df
join_features Add feature-wise information, returns a tbl_df

Installation

if (!requireNamespace("BiocManager", quietly=TRUE))
    install.packages("BiocManager")

BiocManager::install("tidySingleCellExperiment")

Load libraries used in this vignette.

# Bioconductor single-cell packages
library(scater)
library(scran)
library(SingleR)
library(SingleCellSignalR)

# Tidyverse-compatible packages
library(ggplot2)
library(purrr)
library(tidyHeatmap)

# Both
library(tidySingleCellExperiment)

Create tidySingleCellExperiment, the best of both worlds!

This is a SingleCellExperiment object but it is evaluated as a tibble. So it is compatible both with SingleCellExperiment and tidyverse.

pbmc_small_tidy <- tidySingleCellExperiment::pbmc_small 

It looks like a tibble

pbmc_small_tidy
## # A SingleCellExperiment-tibble abstraction: 80 × 17
## # Features=230 | Cells=80 | Assays=counts, logcounts
##    .cell orig.ident nCount_RNA nFeature_RNA RNA_snn_res.0.8 letter.idents groups
##    <chr> <fct>           <dbl>        <int> <fct>           <fct>         <chr> 
##  1 ATGC… SeuratPro…         70           47 0               A             g2    
##  2 CATG… SeuratPro…         85           52 0               A             g1    
##  3 GAAC… SeuratPro…         87           50 1               B             g2    
##  4 TGAC… SeuratPro…        127           56 0               A             g2    
##  5 AGTC… SeuratPro…        173           53 0               A             g2    
##  6 TCTG… SeuratPro…         70           48 0               A             g1    
##  7 TGGT… SeuratPro…         64           36 0               A             g1    
##  8 GCAG… SeuratPro…         72           45 0               A             g1    
##  9 GATA… SeuratPro…         52           36 0               A             g1    
## 10 AATG… SeuratPro…        100           41 0               A             g1    
## # ℹ 70 more rows
## # ℹ 10 more variables: RNA_snn_res.1 <fct>, file <chr>, ident <fct>,
## #   PC_1 <dbl>, PC_2 <dbl>, PC_3 <dbl>, PC_4 <dbl>, PC_5 <dbl>, tSNE_1 <dbl>,
## #   tSNE_2 <dbl>

But it is a SingleCellExperiment object after all

assay(pbmc_small_tidy, "counts")[1:5, 1:5]
## 5 x 5 sparse Matrix of class "dgCMatrix"
##         ATGCCAGAACGACT CATGGCCTGTGCAT GAACCTGATGAACC TGACTGGATTCTCA
## MS4A1                .              .              .              .
## CD79B                1              .              .              .
## CD79A                .              .              .              .
## HLA-DRA              .              1              .              .
## TCL1A                .              .              .              .
##         AGTCAGACTGCACA
## MS4A1                .
## CD79B                .
## CD79A                .
## HLA-DRA              1
## TCL1A                .

Annotation polishing

We may have a column that contains the directory each run was taken from, such as the “file” column in pbmc_small_tidy.

pbmc_small_tidy$file[1:5]
## [1] "../data/sample2/outs/filtered_feature_bc_matrix/"
## [2] "../data/sample1/outs/filtered_feature_bc_matrix/"
## [3] "../data/sample2/outs/filtered_feature_bc_matrix/"
## [4] "../data/sample2/outs/filtered_feature_bc_matrix/"
## [5] "../data/sample2/outs/filtered_feature_bc_matrix/"

We may want to extract the run/sample name out of it into a separate column. Tidyverse extract can be used to convert a character column into multiple columns using regular expression groups.

# Create sample column
pbmc_small_polished <-
    pbmc_small_tidy %>%
    extract(file, "sample", "../data/([a-z0-9]+)/outs.+", remove=FALSE)

# Reorder to have sample column up front
pbmc_small_polished %>%
    select(sample, everything())
## # A SingleCellExperiment-tibble abstraction: 80 × 18
## # Features=230 | Cells=80 | Assays=counts, logcounts
##    .cell sample orig.ident nCount_RNA nFeature_RNA RNA_snn_res.0.8 letter.idents
##    <chr> <chr>  <fct>           <dbl>        <int> <fct>           <fct>        
##  1 ATGC… sampl… SeuratPro…         70           47 0               A            
##  2 CATG… sampl… SeuratPro…         85           52 0               A            
##  3 GAAC… sampl… SeuratPro…         87           50 1               B            
##  4 TGAC… sampl… SeuratPro…        127           56 0               A            
##  5 AGTC… sampl… SeuratPro…        173           53 0               A            
##  6 TCTG… sampl… SeuratPro…         70           48 0               A            
##  7 TGGT… sampl… SeuratPro…         64           36 0               A            
##  8 GCAG… sampl… SeuratPro…         72           45 0               A            
##  9 GATA… sampl… SeuratPro…         52           36 0               A            
## 10 AATG… sampl… SeuratPro…        100           41 0               A            
## # ℹ 70 more rows
## # ℹ 11 more variables: groups <chr>, RNA_snn_res.1 <fct>, file <chr>,
## #   ident <fct>, PC_1 <dbl>, PC_2 <dbl>, PC_3 <dbl>, PC_4 <dbl>, PC_5 <dbl>,
## #   tSNE_1 <dbl>, tSNE_2 <dbl>

Preliminary plots

Set colours and theme for plots.

# Use colourblind-friendly colours
friendly_cols <- dittoSeq::dittoColors()

# Set theme
custom_theme <-
    list(
        scale_fill_manual(values=friendly_cols),
        scale_color_manual(values=friendly_cols),
        theme_bw() +
            theme(
                panel.border=element_blank(),
                axis.line=element_line(),
                panel.grid.major=element_line(size=0.2),
                panel.grid.minor=element_line(size=0.1),
                text=element_text(size=12),
                legend.position="bottom",
                aspect.ratio=1,
                strip.background=element_blank(),
                axis.title.x=element_text(margin=margin(t=10, r=10, b=10, l=10)),
                axis.title.y=element_text(margin=margin(t=10, r=10, b=10, l=10))
            )
    )

We can treat pbmc_small_polished as a tibble for plotting.

Here we plot number of features per cell.

pbmc_small_polished %>%
    tidySingleCellExperiment::ggplot(aes(nFeature_RNA, fill=groups)) +
    geom_histogram() +
    custom_theme

plot of chunk plot1

Here we plot total features per cell.

pbmc_small_polished %>%
    tidySingleCellExperiment::ggplot(aes(groups, nCount_RNA, fill=groups)) +
    geom_boxplot(outlier.shape=NA) +
    geom_jitter(width=0.1) +
    custom_theme

plot of chunk plot2

Here we plot abundance of two features for each group.

pbmc_small_polished %>%
    join_features(features=c("HLA-DRA", "LYZ")) %>%
    ggplot(aes(groups, .abundance_counts + 1, fill=groups)) +
    geom_boxplot(outlier.shape=NA) +
    geom_jitter(aes(size=nCount_RNA), alpha=0.5, width=0.2) +
    scale_y_log10() +
    custom_theme

plot of chunk unnamed-chunk-10

Preprocess the dataset

We can also treat pbmc_small_polished as a SingleCellExperiment object and proceed with data processing with Bioconductor packages, such as scran [@lun2016pooling] and scater [@mccarthy2017scater].

# Identify variable genes with scran
variable_genes <-
    pbmc_small_polished %>%
    modelGeneVar() %>%
    getTopHVGs(prop=0.1)

# Perform PCA with scater
pbmc_small_pca <-
    pbmc_small_polished %>%
    runPCA(subset_row=variable_genes)

pbmc_small_pca
## # A SingleCellExperiment-tibble abstraction: 80 × 18
## # Features=230 | Cells=80 | Assays=counts, logcounts
##    .cell orig.ident nCount_RNA nFeature_RNA RNA_snn_res.0.8 letter.idents groups
##    <chr> <fct>           <dbl>        <int> <fct>           <fct>         <chr> 
##  1 ATGC… SeuratPro…         70           47 0               A             g2    
##  2 CATG… SeuratPro…         85           52 0               A             g1    
##  3 GAAC… SeuratPro…         87           50 1               B             g2    
##  4 TGAC… SeuratPro…        127           56 0               A             g2    
##  5 AGTC… SeuratPro…        173           53 0               A             g2    
##  6 TCTG… SeuratPro…         70           48 0               A             g1    
##  7 TGGT… SeuratPro…         64           36 0               A             g1    
##  8 GCAG… SeuratPro…         72           45 0               A             g1    
##  9 GATA… SeuratPro…         52           36 0               A             g1    
## 10 AATG… SeuratPro…        100           41 0               A             g1    
## # ℹ 70 more rows
## # ℹ 11 more variables: RNA_snn_res.1 <fct>, file <chr>, sample <chr>,
## #   ident <fct>, PC1 <dbl>, PC2 <dbl>, PC3 <dbl>, PC4 <dbl>, PC5 <dbl>,
## #   tSNE_1 <dbl>, tSNE_2 <dbl>

If a tidyverse-compatible package is not included in the tidySingleCellExperiment collection, we can use as_tibble to permanently convert tidySingleCellExperiment into a tibble.

# Create pairs plot with GGally
pbmc_small_pca %>%
    as_tibble() %>%
    select(contains("PC"), everything()) %>%
    GGally::ggpairs(columns=1:5, ggplot2::aes(colour=groups)) +
    custom_theme

plot of chunk pc_plot

Identify clusters

We can proceed with cluster identification with scran.

pbmc_small_cluster <- pbmc_small_pca

# Assign clusters to the 'colLabels' of the SingleCellExperiment object
colLabels(pbmc_small_cluster) <-
    pbmc_small_pca %>%
    buildSNNGraph(use.dimred="PCA") %>%
    igraph::cluster_walktrap() %$%
    membership %>%
    as.factor()

# Reorder columns
pbmc_small_cluster %>% select(label, everything())
## # A SingleCellExperiment-tibble abstraction: 80 × 19
## # Features=230 | Cells=80 | Assays=counts, logcounts
##    .cell  label orig.ident nCount_RNA nFeature_RNA RNA_snn_res.0.8 letter.idents
##    <chr>  <fct> <fct>           <dbl>        <int> <fct>           <fct>        
##  1 ATGCC… 2     SeuratPro…         70           47 0               A            
##  2 CATGG… 2     SeuratPro…         85           52 0               A            
##  3 GAACC… 2     SeuratPro…         87           50 1               B            
##  4 TGACT… 1     SeuratPro…        127           56 0               A            
##  5 AGTCA… 2     SeuratPro…        173           53 0               A            
##  6 TCTGA… 2     SeuratPro…         70           48 0               A            
##  7 TGGTA… 1     SeuratPro…         64           36 0               A            
##  8 GCAGC… 2     SeuratPro…         72           45 0               A            
##  9 GATAT… 2     SeuratPro…         52           36 0               A            
## 10 AATGT… 2     SeuratPro…        100           41 0               A            
## # ℹ 70 more rows
## # ℹ 12 more variables: groups <chr>, RNA_snn_res.1 <fct>, file <chr>,
## #   sample <chr>, ident <fct>, PC1 <dbl>, PC2 <dbl>, PC3 <dbl>, PC4 <dbl>,
## #   PC5 <dbl>, tSNE_1 <dbl>, tSNE_2 <dbl>

And interrogate the output as if it was a regular tibble.

# Count number of cells for each cluster per group
pbmc_small_cluster %>%
    tidySingleCellExperiment::count(groups, label)
## # A tibble: 8 × 3
##   groups label     n
##   <chr>  <fct> <int>
## 1 g1     1        12
## 2 g1     2        14
## 3 g1     3        14
## 4 g1     4         4
## 5 g2     1        10
## 6 g2     2        11
## 7 g2     3        10
## 8 g2     4         5

We can identify and visualise cluster markers combining SingleCellExperiment, tidyverse functions and tidyHeatmap [@mangiola2020tidyheatmap]

# Identify top 10 markers per cluster
marker_genes <-
    pbmc_small_cluster %>%
    findMarkers(groups=pbmc_small_cluster$label) %>%
    as.list() %>%
    map(~ .x %>%
        head(10) %>%
        rownames()) %>%
    unlist()

# Plot heatmap
pbmc_small_cluster %>%
    join_features(features=marker_genes) %>%
    group_by(label) %>%
    heatmap(.feature, .cell, .abundance_counts, .scale="column")

plot of chunk unnamed-chunk-11

Reduce dimensions

We can calculate the first 3 UMAP dimensions using the SingleCellExperiment framework and scater.

pbmc_small_UMAP <-
    pbmc_small_cluster %>%
    runUMAP(ncomponents=3)

And we can plot the result in 3D using plotly.

pbmc_small_UMAP %>%
    plot_ly(
        x=~`UMAP1`,
        y=~`UMAP2`,
        z=~`UMAP3`,
        color=~label,
        colors=friendly_cols[1:4]
    )

plotly screenshot

Cell type prediction

We can infer cell type identities using SingleR [@aran2019reference] and manipulate the output using tidyverse.

# Get cell type reference data
blueprint <- celldex::BlueprintEncodeData()

# Infer cell identities
cell_type_df <-

    assays(pbmc_small_UMAP)$logcounts %>%
    Matrix::Matrix(sparse = TRUE) %>%
    SingleR::SingleR(
        ref = blueprint,
        labels = blueprint$label.main,
        method = "single"
    ) %>%
    as.data.frame() %>%
    as_tibble(rownames="cell") %>%
    select(cell, first.labels)
# Join UMAP and cell type info
pbmc_small_cell_type <-
    pbmc_small_UMAP %>%
    left_join(cell_type_df, by="cell")

# Reorder columns
pbmc_small_cell_type %>%
    tidySingleCellExperiment::select(cell, first.labels, everything())
## # A SingleCellExperiment-tibble abstraction: 80 × 23
## # Features=230 | Cells=80 | Assays=counts, logcounts
##    cell          first.labels orig.ident nCount_RNA nFeature_RNA RNA_snn_res.0.8
##    <chr>         <chr>        <fct>           <dbl>        <int> <fct>          
##  1 ATGCCAGAACGA… CD4+ T-cells SeuratPro…         70           47 0              
##  2 CATGGCCTGTGC… CD8+ T-cells SeuratPro…         85           52 0              
##  3 GAACCTGATGAA… CD8+ T-cells SeuratPro…         87           50 1              
##  4 TGACTGGATTCT… CD4+ T-cells SeuratPro…        127           56 0              
##  5 AGTCAGACTGCA… CD4+ T-cells SeuratPro…        173           53 0              
##  6 TCTGATACACGT… CD4+ T-cells SeuratPro…         70           48 0              
##  7 TGGTATCTAAAC… CD4+ T-cells SeuratPro…         64           36 0              
##  8 GCAGCTCTGTTT… CD4+ T-cells SeuratPro…         72           45 0              
##  9 GATATAACACGC… CD4+ T-cells SeuratPro…         52           36 0              
## 10 AATGTTGACAGT… CD4+ T-cells SeuratPro…        100           41 0              
## # ℹ 70 more rows
## # ℹ 17 more variables: letter.idents <fct>, groups <chr>, RNA_snn_res.1 <fct>,
## #   file <chr>, sample <chr>, ident <fct>, label <fct>, PC1 <dbl>, PC2 <dbl>,
## #   PC3 <dbl>, PC4 <dbl>, PC5 <dbl>, tSNE_1 <dbl>, tSNE_2 <dbl>, UMAP1 <dbl>,
## #   UMAP2 <dbl>, UMAP3 <dbl>

We can easily summarise the results. For example, we can see how cell type classification overlaps with cluster classification.

# Count number of cells for each cell type per cluster
pbmc_small_cell_type %>%
    count(label, first.labels)
## # A tibble: 11 × 3
##    label first.labels     n
##    <fct> <chr>        <int>
##  1 1     CD4+ T-cells     2
##  2 1     CD8+ T-cells     8
##  3 1     NK cells        12
##  4 2     B-cells         10
##  5 2     CD4+ T-cells     6
##  6 2     CD8+ T-cells     2
##  7 2     Macrophages      1
##  8 2     Monocytes        6
##  9 3     Macrophages      1
## 10 3     Monocytes       23
## 11 4     Erythrocytes     9

We can easily reshape the data for building information-rich faceted plots.

pbmc_small_cell_type %>%

    # Reshape and add classifier column
    pivot_longer(
        cols=c(label, first.labels),
        names_to="classifier", values_to="label"
    ) %>%

    # UMAP plots for cell type and cluster
    ggplot(aes(UMAP1, UMAP2, color=label)) +
    geom_point() +
    facet_wrap(~classifier) +
    custom_theme

plot of chunk unnamed-chunk-15

We can easily plot gene correlation per cell category, adding multi-layer annotations.

pbmc_small_cell_type %>%

    # Add some mitochondrial abundance values
    mutate(mitochondrial=rnorm(dplyr::n())) %>%

    # Plot correlation
    join_features(features=c("CST3", "LYZ"), shape="wide") %>%
    ggplot(aes(CST3 + 1, LYZ + 1, color=groups, size=mitochondrial)) +
    geom_point() +
    facet_wrap(~first.labels, scales="free") +
    scale_x_log10() +
    scale_y_log10() +
    custom_theme

plot of chunk unnamed-chunk-16

Nested analyses

A powerful tool we can use with tidySingleCellExperiment is tidyverse nest. We can easily perform independent analyses on subsets of the dataset. First we classify cell types into lymphoid and myeloid, and then nest based on the new classification.

pbmc_small_nested <-
    pbmc_small_cell_type %>%
    filter(first.labels != "Erythrocytes") %>%
    mutate(cell_class=dplyr::if_else(`first.labels` %in% c("Macrophages", "Monocytes"), "myeloid", "lymphoid")) %>%
    nest(data=-cell_class)

pbmc_small_nested
## # A tibble: 2 × 2
##   cell_class data           
##   <chr>      <list>         
## 1 lymphoid   <SnglCllE[,40]>
## 2 myeloid    <SnglCllE[,31]>

Now we can independently for the lymphoid and myeloid subsets (i) find variable features, (ii) reduce dimensions, and (iii) cluster using both tidyverse and SingleCellExperiment seamlessly.

pbmc_small_nested_reanalysed <-
    pbmc_small_nested %>%
    mutate(data=map(
        data, ~ {
            .x <- runPCA(.x, subset_row=variable_genes)

            variable_genes <-
                .x %>%
                modelGeneVar() %>%
                getTopHVGs(prop=0.3)

            colLabels(.x) <-
                .x %>%
                buildSNNGraph(use.dimred="PCA") %>%
                igraph::cluster_walktrap() %$%
                membership %>%
                as.factor()

            .x %>% runUMAP(ncomponents=3)
        }
    ))

pbmc_small_nested_reanalysed
## # A tibble: 2 × 2
##   cell_class data           
##   <chr>      <list>         
## 1 lymphoid   <SnglCllE[,40]>
## 2 myeloid    <SnglCllE[,31]>

We can then unnest and plot the new classification.

pbmc_small_nested_reanalysed %>%

    # Convert to tibble otherwise SingleCellExperiment drops reduced dimensions when unifying data sets.
    mutate(data=map(data, ~ .x %>% as_tibble())) %>%
    unnest(data) %>%

    # Define unique clusters
    unite("cluster", c(cell_class, label), remove=FALSE) %>%

    # Plotting
    ggplot(aes(UMAP1, UMAP2, color=cluster)) +
    geom_point() +
    facet_wrap(~cell_class) +
    custom_theme

plot of chunk unnamed-chunk-19

We can perform a large number of functional analyses on data subsets. For example, we can identify intra-sample cell-cell interactions using SingleCellSignalR [@cabello2020singlecellsignalr], and then compare whether interactions are stronger or weaker across conditions. The code below demonstrates how this analysis could be performed. It won’t work with this small example dataset as we have just two samples (one for each condition). But some example output is shown below and you can imagine how you can use tidyverse on the output to perform t-tests and visualisation.

pbmc_small_nested_interactions <-
    pbmc_small_nested_reanalysed %>%

    # Unnest based on cell category
    unnest(data) %>%

    # Create unambiguous clusters
    mutate(integrated_clusters=first.labels %>% as.factor() %>% as.integer()) %>%

    # Nest based on sample
    tidySingleCellExperiment::nest(data=-sample) %>%
    tidySingleCellExperiment::mutate(interactions=map(data, ~ {

        # Produce variables. Yuck!
        cluster <- colData(.x)$integrated_clusters
        data <- data.frame(assays(.x) %>% as.list() %>% .[[1]] %>% as.matrix())

        # Ligand/Receptor analysis using SingleCellSignalR
        data %>%
            cell_signaling(genes=rownames(data), cluster=cluster) %>%
            inter_network(data=data, signal=., genes=rownames(data), cluster=cluster) %$%
            `individual-networks` %>%
            map_dfr(~ bind_rows(as_tibble(.x)))
    }))

pbmc_small_nested_interactions %>%
    select(-data) %>%
    unnest(interactions)

If the dataset was not so small, and interactions could be identified, you would see something like below.

tidySingleCellExperiment::pbmc_small_nested_interactions
## # A tibble: 100 × 9
##    sample  ligand          receptor ligand.name receptor.name origin destination
##    <chr>   <chr>           <chr>    <chr>       <chr>         <chr>  <chr>      
##  1 sample1 cluster 1.PTMA  cluster… PTMA        VIPR1         clust… cluster 2  
##  2 sample1 cluster 1.B2M   cluster… B2M         KLRD1         clust… cluster 2  
##  3 sample1 cluster 1.IL16  cluster… IL16        CD4           clust… cluster 2  
##  4 sample1 cluster 1.HLA-B cluster… HLA-B       KLRD1         clust… cluster 2  
##  5 sample1 cluster 1.CALM1 cluster… CALM1       VIPR1         clust… cluster 2  
##  6 sample1 cluster 1.HLA-E cluster… HLA-E       KLRD1         clust… cluster 2  
##  7 sample1 cluster 1.GNAS  cluster… GNAS        VIPR1         clust… cluster 2  
##  8 sample1 cluster 1.B2M   cluster… B2M         HFE           clust… cluster 2  
##  9 sample1 cluster 1.PTMA  cluster… PTMA        VIPR1         clust… cluster 3  
## 10 sample1 cluster 1.CALM1 cluster… CALM1       VIPR1         clust… cluster 3  
## # ℹ 90 more rows
## # ℹ 2 more variables: interaction.type <chr>, LRscore <dbl>

Session Info

sessionInfo()
## R version 4.3.0 RC (2023-04-13 r84269)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 22.04.2 LTS
## 
## Matrix products: default
## BLAS:   /home/biocbuild/bbs-3.17-bioc/R/lib/libRblas.so 
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_GB              LC_COLLATE=C              
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## time zone: America/New_York
## tzcode source: system (glibc)
## 
## attached base packages:
## [1] stats4    stats     graphics  grDevices utils     datasets  methods  
## [8] base     
## 
## other attached packages:
##  [1] tidySingleCellExperiment_1.10.0 ttservice_0.2.2                
##  [3] tidyHeatmap_1.8.1               purrr_1.0.1                    
##  [5] SingleCellSignalR_1.12.0        SingleR_2.2.0                  
##  [7] scran_1.28.0                    scater_1.28.0                  
##  [9] ggplot2_3.4.2                   scuttle_1.10.0                 
## [11] SingleCellExperiment_1.22.0     SummarizedExperiment_1.30.0    
## [13] Biobase_2.60.0                  GenomicRanges_1.52.0           
## [15] GenomeInfoDb_1.36.0             IRanges_2.34.0                 
## [17] S4Vectors_0.38.0                BiocGenerics_0.46.0            
## [19] MatrixGenerics_1.12.0           matrixStats_0.63.0             
## [21] knitr_1.42                     
## 
## loaded via a namespace (and not attached):
##   [1] RColorBrewer_1.1-3        jsonlite_1.8.4           
##   [3] shape_1.4.6               magrittr_2.0.3           
##   [5] magick_2.7.4              ggbeeswarm_0.7.1         
##   [7] farver_2.1.1              GlobalOptions_0.1.2      
##   [9] zlibbioc_1.46.0           vctrs_0.6.2              
##  [11] multtest_2.56.0           Cairo_1.6-0              
##  [13] DelayedMatrixStats_1.22.0 RCurl_1.98-1.12          
##  [15] htmltools_0.5.5           BiocNeighbors_1.18.0     
##  [17] KernSmooth_2.23-20        htmlwidgets_1.6.2        
##  [19] plyr_1.8.8                plotly_4.10.1            
##  [21] igraph_1.4.2              lifecycle_1.0.3          
##  [23] iterators_1.0.14          pkgconfig_2.0.3          
##  [25] rsvd_1.0.5                Matrix_1.5-4             
##  [27] R6_2.5.1                  fastmap_1.1.1            
##  [29] GenomeInfoDbData_1.2.10   clue_0.3-64              
##  [31] digest_0.6.31             reshape_0.8.9            
##  [33] GGally_2.1.2              colorspace_2.1-0         
##  [35] patchwork_1.1.2           dqrng_0.3.0              
##  [37] irlba_2.3.5.1             beachmat_2.16.0          
##  [39] labeling_0.4.2            fansi_1.0.4              
##  [41] httr_1.4.5                compiler_4.3.0           
##  [43] withr_2.5.0               doParallel_1.0.17        
##  [45] BiocParallel_1.34.0       viridis_0.6.2            
##  [47] highr_0.10                dendextend_1.17.1        
##  [49] gplots_3.1.3              MASS_7.3-59              
##  [51] DelayedArray_0.26.0       rjson_0.2.21             
##  [53] bluster_1.10.0            gtools_3.9.4             
##  [55] caTools_1.18.2            tools_4.3.0              
##  [57] vipor_0.4.5               beeswarm_0.4.0           
##  [59] glue_1.6.2                grid_4.3.0               
##  [61] Rtsne_0.16                cluster_2.1.4            
##  [63] generics_0.1.3            gtable_0.3.3             
##  [65] tidyr_1.3.0               data.table_1.14.8        
##  [67] BiocSingular_1.16.0       ScaledMatrix_1.8.0       
##  [69] metapod_1.8.0             utf8_1.2.3               
##  [71] XVector_0.40.0            ggrepel_0.9.3            
##  [73] foreach_1.5.2             pillar_1.9.0             
##  [75] stringr_1.5.0             limma_3.56.0             
##  [77] circlize_0.4.15           splines_4.3.0            
##  [79] dplyr_1.1.2               lattice_0.21-8           
##  [81] FNN_1.1.3.2               survival_3.5-5           
##  [83] tidyselect_1.2.0          ComplexHeatmap_2.16.0    
##  [85] locfit_1.5-9.7            gridExtra_2.3            
##  [87] edgeR_3.42.0              xfun_0.39                
##  [89] dittoSeq_1.12.0           statmod_1.5.0            
##  [91] pheatmap_1.0.12           stringi_1.7.12           
##  [93] lazyeval_0.2.2            evaluate_0.20            
##  [95] codetools_0.2-19          tibble_3.2.1             
##  [97] BiocManager_1.30.20       cli_3.6.1                
##  [99] uwot_0.1.14               munsell_0.5.0            
## [101] Rcpp_1.0.10               png_0.1-8                
## [103] parallel_4.3.0            ellipsis_0.3.2           
## [105] sparseMatrixStats_1.12.0  bitops_1.0-7             
## [107] viridisLite_0.4.1         ggridges_0.5.4           
## [109] scales_1.2.1              crayon_1.5.2             
## [111] GetoptLong_1.0.5          rlang_1.1.0              
## [113] cowplot_1.1.1

References