# scDataviz: single cell dataviz and downstream analyses

#### Kevin Blighe

#### 2022-11-01

# 1 Introduction

In the single cell World, which includes flow cytometry, mass cytometry, single-cell RNA-seq (scRNA-seq), and others, there is a need to improve data visualisation and to bring analysis capabilities to researchers even from non-technical backgrounds. scDataviz (Blighe 2020) attempts to fit into this space, while also catering for advanced users. Additonally, due to the way that scDataviz is designed, which is based on SingleCellExperiment (Lun and Risso 2020), it has a ‘plug and play’ feel, and immediately lends itself as flexibile and compatibile with studies that go beyond scDataviz. Finally, the graphics in scDataviz are generated via the ggplot (Wickham 2016) engine, which means that users can ‘add on’ features to these with ease.

This package just provides some additional functions for dataviz and clustering, and provides another way of identifying cell-types in clusters. It is not strictly intended as a standalone analysis package. For a comprehensive high-dimensional cytometry workflow, it is recommended to check out the work by Nowicka et al. CyTOF workflow: differential discovery in high-throughput high-dimensional cytometry datasets. For a more comprehensive scRNA-seq workflow, please check out OSCA and Analysis of single cell RNA-seq data.

# 2 Installation

## 2.1 1. Download the package from Bioconductor

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

      BiocManager::install('scDataviz')

Note: to install development version:

      devtools::install_github('kevinblighe/scDataviz')

## 2.2 2. Load the package into R session

      library(scDataviz)

# 3 Tutorial 1: CyTOF FCS data

Here, we will utilise some of the flow cytometry data from Deep phenotyping detects a pathological CD4+ T-cell complosome signature in systemic sclerosis.

This can normally be downloadedd via `git clone` from your command prompt:

      git clone https://github.com/kevinblighe/scDataviz_data/ ;

In a practical situation, we would normally read in this data from the raw FCS files and then QC filter, normalise, and transform them. This can be achieved via the `processFCS` function, which, by default, also removes variables based on low variance and downsamples [randomly] your data to 100000 variables. The user can change these via the `downsample` and `downsampleVar` parameters. An example (not run) is given below:

      filelist <- list.files(
        path = "scDataviz_data/FCS/",
        pattern = "*.fcs|*.FCS",
        full.names = TRUE)
      filelist

      metadata <- data.frame(
        sample = gsub('\\ [A-Za-z0-9]*\\.fcs$', '',
          gsub('scDataviz_data\\/FCS\\/\\/', '', filelist)),
        group = c(rep('Healthy', 7), rep('Disease', 11)),
        treatment = gsub('\\.fcs$', '',
          gsub('scDataviz_data\\/FCS\\/\\/[A-Z0-9]*\\ ', '', filelist)),
        row.names = filelist,
        stringsAsFactors = FALSE)
      metadata

      inclusions <- c('Yb171Di','Nd144Di','Nd145Di',
        'Er168Di','Tm169Di','Sm154Di','Yb173Di','Yb174Di',
        'Lu175Di','Nd143Di')

      markernames <- c('Foxp3','C3aR','CD4',
        'CD46','CD25','CD3','Granzyme B','CD55',
        'CD279','CD45RA')

      names(markernames) <- inclusions
      markernames

      exclusions <- c('Time','Event_length','BCKG190Di',
        'Center','Offset','Width','Residual')

      sce <- processFCS(
        files = filelist,
        metadata = metadata,
        transformation = TRUE,
        transFun = function (x) asinh(x),
        asinhFactor = 5,
        downsample = 10000,
        downsampleVar = 0.7,
        colsRetain = inclusions,
        colsDiscard = exclusions,
        newColnames = markernames)

In flow and mass cytometry, getting the correct marker names in the FCS files can be surprisingly difficult. In many cases, from experience, a facility may label the markers by their metals, such as Iridium (Ir), Ruthenium (Ru), Terbium (Tb), et cetera - this is the case for the data used in this tutorial. The true marker names may be held as pData encoded within each FCS, accessible via:

      library(flowCore)
      pData(parameters(
        read.FCS(filelist[[4]], transformation = FALSE, emptyValue = FALSE)))

Whatever the case, it is important to sort out marker naming issues prior to the experiment being conducted in order to avoid any confusion.

For this vignette, due to the fact that the raw FCS data is > 500 megabytes, we will work with a smaller pre-prepared dataset that has been downsampled to 10000 cells using the above code. This data comes included with the package.

Load the pre-prepared complosome data.

      load(system.file('extdata/', 'complosome.rdata', package = 'scDataviz'))

One can also create a new SingleCellExperiment object manually using any type of data, including any data from scRNA-seq produced elsewhere. Import functions for data deriving from other sources is covered in Tutorials 2 and 3 in this vignette. All functions in scDataviz additionally accept data-frames or matrices on their own, de-necessitating the reliance on the SingleCellExperiment class.

## 3.1 Perform principal component analysis (PCA)

We can use the PCAtools (Blighe and Lun 2020) package for the purpose of performing PCA.

      library(PCAtools)
      p <- pca(assay(sce, 'scaled'), metadata = metadata(sce))

      biplot(p,
        x = 'PC1', y = 'PC2',
        lab = NULL,
        xlim = c(min(p$rotated[,'PC1'])-1, max(p$rotated[,'PC1'])+1),
        ylim = c(min(p$rotated[,'PC2'])-1, max(p$rotated[,'PC2'])+1),
        pointSize = 1.0,
        colby = 'treatment',
        legendPosition = 'right',
        title = 'PCA applied to CyTOF data',
        caption = paste0('10000 cells randomly selected after ',
          'having filtered for low variance'))

Perform PCA

We can add the rotated component loadings as a new reduced dimensional component to our dataset.

      reducedDim(sce, 'PCA') <- p$rotated

For more functionality via PCAtools, check the vignette: PCAtools: everything Principal Component Analysis

## 3.2 Perform UMAP

UMAP can be performed on the entire dataset, if your computer’s memory will permit. Currently it’s default is to use the data contained in the ‘scaled’ assay component of your SingleCellExperiment object.

      sce <- performUMAP(sce)

UMAP can also be stratified based on a column in your metadata, e.g., (treated versus untreated samples); however, to do this, I recommend creating separate SingleCellExperiment objects from the very start, i.e., from the the data input stage, and processing the data separately for each group.

Nota bene - advanced users may want to change the default configuration for UMAP. scDataviz currently performs UMAP via the umap package. In order to modify the default configuration, one can pull in the default config separately from the umap package and then modify these config values held in the umap.defaults variable, as per the umap vignette (see ‘Tuning UMAP’ section). For example:

      config <- umap::umap.defaults
      config$min_dist <- 0.5
      performUMAP(sce, config = config)

We can also perform UMAP on a select number of PC eigenvectors. PCAtools (Blighe and Lun 2020) can be used to infer ideal number of dimensions to use via the elbow method and Horn’s parallel analysis.

      elbow <- findElbowPoint(p$variance)
      horn <- parallelPCA(assay(sce, 'scaled'))

      elbow

    ## PC3
    ##   3

      horn$n

    ## [1] 1

For now, let’s just use 5 PCs.

      sce <- performUMAP(sce, reducedDim = 'PCA', dims = c(1:5))

## 3.3 Create a contour plot of the UMAP layout

This and the remaining sections in this tutorial are about producing great visualisations of the data and attempting to make sense of it, while not fully overlapping with functionalioty provided by other programs that operate in tis space.

With the contour plot, we are essentially looking at celluar density. It can provide for a beautiful viusualisation in a manuscript while also serving as a useful QC tool: if the density is ‘scrunched up’ into a single area in the plot space, then there are likely issues with your input data distribution. We want to see well-separated, high density ‘islands’, or, at least, gradual gradients that blend into one another across high density ‘peaks’.

      ggout1 <- contourPlot(sce,
        reducedDim = 'UMAP',
        bins = 150,
        subtitle = 'UMAP performed on expression values',
        legendLabSize = 18,
        axisLabSize = 22,
        titleLabSize = 22,
        subtitleLabSize = 18,
        captionLabSize = 18)

      ggout2 <- contourPlot(sce,
        reducedDim = 'UMAP_PCA',
        bins = 150,
        subtitle = 'UMAP performed on PC eigenvectors',
        legendLabSize = 18,
        axisLabSize = 22,
        titleLabSize = 22,
        subtitleLabSize = 18,
        captionLabSize = 18)

      cowplot::plot_grid(ggout1, ggout2,
        labels = c('A','B'),
        ncol = 2, align = "l", label_size = 24)

Create a contour plot of the UMAP layout

## 3.4 Show marker expression across the layout

Here, we randomly select some markers and then plot their expression profiles across the UMAP layouts.

      markers <- sample(rownames(sce), 6)
      markers

    ## [1] "CD55"   "CD25"   "Foxp3"  "C3aR"   "CD46"   "CD45RA"

      ggout1 <- markerExpression(sce,
        markers = markers,
        subtitle = 'UMAP performed on expression values',
        nrow = 1, ncol = 6,
        legendKeyHeight = 1.0,
        legendLabSize = 18,
        stripLabSize = 22,
        axisLabSize = 22,
        titleLabSize = 22,
        subtitleLabSize = 18,
        captionLabSize = 18)

      ggout2 <- markerExpression(sce,
        markers = markers,
        reducedDim = 'UMAP_PCA',
        subtitle = 'UMAP performed on PC eigenvectors',
        nrow = 1, ncol = 6,
        col = c('white', 'darkblue'),
        legendKeyHeight = 1.0,
        legendLabSize = 18,
        stripLabSize = 22,
        axisLabSize = 22,
        titleLabSize = 22,
        subtitleLabSize = 18,
        captionLabSize = 18)

      cowplot::plot_grid(ggout1, ggout2,
        labels = c('A','B'),
        nrow = 2, align = "l", label_size = 24)

Show marker expression across the layout

## 3.5 Shade cells by metadata

Shading cells by metadata can be useful for identifying any batch effects, but also useful for visualising, e.g., differences across treatments.

First, let’s take a look inside the metadata that we have.

      head(metadata(sce))

    ##       sample   group treatment
    ## cell1    P00 Disease    Unstim
    ## cell2    P00 Disease    Unstim
    ## cell3    P04 Disease      CD46
    ## cell4    P03 Disease      CD46
    ## cell5    P08 Disease    Unstim
    ## cell6    P00 Disease      CD46

      levels(metadata(sce)$group)

    ## [1] "Healthy" "Disease"

      levels(metadata(sce)$treatment)

    ## [1] "CD46"   "Unstim" "CD3"

      ggout1 <- metadataPlot(sce,
        colby = 'group',
        colkey = c(Healthy = 'royalblue', Disease = 'red2'),
        title = 'Disease status',
        subtitle = 'UMAP performed on expression values',
        legendLabSize = 16,
        axisLabSize = 20,
        titleLabSize = 20,
        subtitleLabSize = 16,
        captionLabSize = 16)

      ggout2 <- metadataPlot(sce,
        reducedDim = 'UMAP_PCA',
        colby = 'group',
        colkey = c(Healthy = 'royalblue', Disease = 'red2'),
        title = 'Disease status',
        subtitle = 'UMAP performed on PC eigenvectors',
        legendLabSize = 16,
        axisLabSize = 20,
        titleLabSize = 20,
        subtitleLabSize = 16,
        captionLabSize = 16)

      ggout3 <- metadataPlot(sce,
        colby = 'treatment',
        title = 'Treatment type',
        subtitle = 'UMAP performed on expression values',
        legendLabSize = 16,
        axisLabSize = 20,
        titleLabSize = 20,
        subtitleLabSize = 16,
        captionLabSize = 16)

      ggout4 <- metadataPlot(sce,
        reducedDim = 'UMAP_PCA',
        colby = 'treatment',
        title = 'Treatment type',
        subtitle = 'UMAP performed on PC eigenvectors',
        legendLabSize = 16,
        axisLabSize = 20,
        titleLabSize = 20,
        subtitleLabSize = 16,
        captionLabSize = 16)

      cowplot::plot_grid(ggout1, ggout3, ggout2, ggout4,
        labels = c('A','B','C','D'),
        nrow = 2, ncol = 2, align = "l", label_size = 24)

Shade cells by metadata

## 3.6 Find ideal clusters in the UMAP layout via k-nearest neighbours

This function utilises the k nearest neighbours (k-NN) approach from Seurat, which works quite well on flow cytometry and CyTOF UMAP layouts, from my experience.

      sce <- clusKNN(sce,
        k.param = 20,
        prune.SNN = 1/15,
        resolution = 0.01,
        algorithm = 2,
        verbose = FALSE)

      sce <- clusKNN(sce,
        reducedDim = 'UMAP_PCA',
        clusterAssignName = 'Cluster_PCA',
        k.param = 20,
        prune.SNN = 1/15,
        resolution = 0.01,
        algorithm = 2,
        verbose = FALSE)

      ggout1 <- plotClusters(sce,
        clusterColname = 'Cluster',
        labSize = 7.0,
        subtitle = 'UMAP performed on expression values',
        caption = paste0('Note: clusters / communities identified via',
          '\nLouvain algorithm with multilevel refinement'),
        axisLabSize = 20,
        titleLabSize = 20,
        subtitleLabSize = 16,
        captionLabSize = 16)

      ggout2 <- plotClusters(sce,
        clusterColname = 'Cluster_PCA',
        reducedDim = 'UMAP_PCA',
        labSize = 7.0,
        subtitle = 'UMAP performed on PC eigenvectors',
        caption = paste0('Note: clusters / communities identified via',
          '\nLouvain algorithm with multilevel refinement'),
        axisLabSize = 20,
        titleLabSize = 20,
        subtitleLabSize = 16,
        captionLabSize = 16)

      cowplot::plot_grid(ggout1, ggout2,
        labels = c('A','B'),
        ncol = 2, align = "l", label_size = 24)

Find ideal clusters in the UMAP layout via k-nearest neighbours

## 3.7 Plot marker expression per identified cluster

      markerExpressionPerCluster(sce,
        caption = 'Cluster assignments based on UMAP performed on expression values',
        stripLabSize = 22,
        axisLabSize = 22,
        titleLabSize = 22,
        subtitleLabSize = 18,
        captionLabSize = 18)

      clusters <- unique(metadata(sce)[['Cluster_PCA']])
      clusters

    ## [1] 3 0 1 6 4 2 5 7

      markers <- sample(rownames(sce), 5)
      markers

    ## [1] "CD279" "CD3"   "CD25"  "CD46"  "CD55"

      markerExpressionPerCluster(sce,
        clusters = clusters,
        clusterAssign = metadata(sce)[['Cluster_PCA']],
        markers = markers,
        nrow = 2, ncol = 5,
        caption = 'Cluster assignments based on UMAP performed on PC eigenvectors',
        stripLabSize = 22,
        axisLabSize = 22,
        titleLabSize = 22,
        subtitleLabSize = 18,
        captionLabSize = 18)

Plot marker expression per identified cluster2

Try all markers across a single cluster:

      cluster <- sample(unique(metadata(sce)[['Cluster']]), 1)
      cluster

    ## [1] 3

      markerExpressionPerCluster(sce,
        clusters = cluster,
        markers = rownames(sce),
        stripLabSize = 20,
        axisLabSize = 20,
        titleLabSize = 20,
        subtitleLabSize = 14,
        captionLabSize = 12)

Plot marker expression per identified cluster3

## 3.8 Determine enriched markers in each cluster and plot the expression signature

This method also calculates metacluster abundances across a chosen phenotype. The function returns a data-frame, which can then be exported to do other analyses.

### 3.8.1 Disease vs Healthy metacluster abundances

      markerEnrichment(sce,
        method = 'quantile',
        studyvarID = 'group')

Cluster | nCells | TotalCells | PercentCells | NegMarkers | PosMarkers | PerCent_HD00 | PerCent_HD01 | PerCent_HD262 | PerCent_P00 | PerCent_P02 | PerCent_P03 | PerCent_P04 | PerCent_P08 | nCell_Healthy | nCell_Disease
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---
0 | 3311 | 10000 | 33.11 | NA | CD25+ | 0.0604047 | 9.9667774 | 26.2760495 | 23.5276352 | 6.4028994 | 8.2452431 | 18.2724252 | 7.2485654 | 1202 | 2109
1 | 1945 | 10000 | 19.45 | CD25-CD279- | CD3+CD45RA+ | 0.0000000 | 0.2056555 | 61.4395887 | 0.5655527 | 0.2056555 | 0.8740360 | 0.0514139 | 36.6580977 | 1199 | 746
2 | 1301 | 10000 | 13.01 | Granzyme B-CD279- | CD3+ | 15.6033820 | 7.9938509 | 2.4596464 | 63.7970792 | 3.8431975 | 3.6126057 | 1.9215988 | 0.7686395 | 339 | 962
3 | 1228 | 10000 | 12.28 | NA | CD25+ | 6.4332248 | 1.1400651 | 1.3843648 | 3.0130293 | 24.1856678 | 6.8403909 | 56.7589577 | 0.2442997 | 110 | 1118
4 | 965 | 10000 | 9.65 | NA | CD3+ | 16.4766839 | 26.0103627 | 7.4611399 | 28.1865285 | 3.3160622 | 10.1554404 | 6.1139896 | 2.2797927 | 482 | 483
5 | 441 | 10000 | 4.41 | CD25-CD45RA- | NA | 0.4535147 | 4.5351474 | 46.4852608 | 11.1111111 | 0.0000000 | 0.4535147 | 0.2267574 | 36.7346939 | 227 | 214
6 | 301 | 10000 | 3.01 | CD46-CD279- | NA | 0.0000000 | 41.5282392 | 1.9933555 | 54.4850498 | 0.0000000 | 0.3322259 | 0.6644518 | 0.9966777 | 131 | 170
7 | 279 | 10000 | 2.79 | NA | Foxp3+CD25+CD3+ | 0.3584229 | 0.0000000 | 70.6093190 | 1.7921147 | 0.7168459 | 0.7168459 | 0.3584229 | 25.4480287 | 198 | 81
8 | 120 | 10000 | 1.20 | CD46- | NA | 0.0000000 | 53.3333333 | 0.8333333 | 5.0000000 | 0.8333333 | 40.0000000 | 0.0000000 | 0.0000000 | 65 | 55
9 | 109 | 10000 | 1.09 | CD46- | CD25+ | 0.9174312 | 0.0000000 | 0.0000000 | 0.0000000 | 67.8899083 | 27.5229358 | 3.6697248 | 0.0000000 | 1 | 108

.

### 3.8.2 Treatment type metacluster abundances

      markerEnrichment(sce,
        sampleAbundances = FALSE,
        method = 'quantile',
        studyvarID = 'treatment')

Cluster | nCells | TotalCells | PercentCells | NegMarkers | PosMarkers | nCell_CD46 | nCell_Unstim | nCell_CD3
--- | --- | --- | --- | --- | --- | --- | --- | ---
0 | 3311 | 10000 | 33.11 | NA | CD25+ | 3281 | 3 | 27
1 | 1945 | 10000 | 19.45 | CD25-CD279- | CD3+CD45RA+ | 22 | 1919 | 4
2 | 1301 | 10000 | 13.01 | Granzyme B-CD279- | CD3+ | 5 | 1174 | 122
3 | 1228 | 10000 | 12.28 | NA | CD25+ | 20 | 133 | 1075
4 | 965 | 10000 | 9.65 | NA | CD3+ | 4 | 771 | 190
5 | 441 | 10000 | 4.41 | CD25-CD45RA- | NA | 54 | 21 | 366
6 | 301 | 10000 | 3.01 | CD46-CD279- | NA | 290 | 10 | 1
7 | 279 | 10000 | 2.79 | NA | Foxp3+CD25+CD3+ | 2 | 274 | 3
8 | 120 | 10000 | 1.20 | CD46- | NA | 112 | 8 | 0
9 | 109 | 10000 | 1.09 | CD46- | CD25+ | 107 | 0 | 2

.

### 3.8.3 Expression signature

The expression signature is a quick way to visualise which markers are more or less expressed in each identified cluster of cells.

      plotSignatures(sce,
        labCex = 1.2,
        legendCex = 1.2,
        labDegree = 40)

Determine enriched markers in each cluster and plot the expression signature

# 4 Tutorial 2: Import from Seurat

Due to the fact that scDataviz is based on SingleCellExperiment, it has increased interoperability with other packages, including the popular Seurat (Stuart et al. 2018). Taking the data produced from the Seurat Tutorial on Peripheral Blood Mononuclear Cells (PBMCs), we can convert this to a SingleCellExperiment object recognisable by scDataviz via `as.SingleCellExperiment()`.

When deriving from the Seurat route, be sure to manually assign the metadata slot, which is required for some functions. Also be sure to modify the default values for `assay`, `reducedDim`, and `dimColnames`, as these are assigned differently in Seurat.

      sce <- as.SingleCellExperiment(pbmc)

      metadata(sce) <- data.frame(colData(sce))

      markerExpression(sce,
        assay = 'logcounts',
        reducedDim = 'UMAP',
        dimColnames = c('UMAP_1','UMAP_2'),
        markers = c('CD79A', 'Cd79B', 'MS4A1'))

For `markerEnrichment()`, a typical command using an ex-Seurat object could be:

      markerEnrichment(sce,
        assay = 'logcounts',
        method = 'quantile',
        sampleAbundances = TRUE,
        sampleID = 'orig.ident',
        studyvarID = 'ident',
        clusterAssign = as.character(colData(sce)[['seurat_clusters']]))

# 5 Tutorial 3: Import any numerical data

scDataviz will work with any numerical data, too. Here, we show a quick example of how one can import a data-matrix of randomly-generated numbers that follow a negative binomial distribution, comprising 2500 cells and 20 markers:

      mat <- jitter(matrix(
        MASS::rnegbin(rexp(50000, rate=.1), theta = 4.5),
        ncol = 20))
      colnames(mat) <- paste0('CD', 1:ncol(mat))
      rownames(mat) <- paste0('cell', 1:nrow(mat))

      metadata <- data.frame(
        group = rep('A', nrow(mat)),
        row.names = rownames(mat),
        stringsAsFactors = FALSE)
      head(metadata)

    ##       group
    ## cell1     A
    ## cell2     A
    ## cell3     A
    ## cell4     A
    ## cell5     A
    ## cell6     A

      sce <- importData(mat,
        assayname = 'normcounts',
        metadata = metadata)
      sce

    ## class: SingleCellExperiment
    ## dim: 20 2500
    ## metadata(1): group
    ## assays(1): normcounts
    ## rownames(20): CD1 CD2 ... CD19 CD20
    ## rowData names(0):
    ## colnames(2500): cell1 cell2 ... cell2499 cell2500
    ## colData names(0):
    ## reducedDimNames(0):
    ## mainExpName: NULL
    ## altExpNames(0):

This will also work without any assigned metadata; however, having no metadata limits the functionality of the package.

      sce <- importData(mat,
        assayname = 'normcounts',
        metadata = NULL)
      sce

    ## class: SingleCellExperiment
    ## dim: 20 2500
    ## metadata(0):
    ## assays(1): normcounts
    ## rownames(20): CD1 CD2 ... CD19 CD20
    ## rowData names(0):
    ## colnames(2500): cell1 cell2 ... cell2499 cell2500
    ## colData names(0):
    ## reducedDimNames(0):
    ## mainExpName: NULL
    ## altExpNames(0):

# 6 Acknowledgments

- Jessica Timms
- James Opzoomer
- Shahram Kordasti
- Marcel Ramos (Bioconductor)
- Lori Shepherd (Bioconductor)
- Bioinformatics CRO
- Henrik Bengtsson

# 7 Session info

    sessionInfo()

    ## R version 4.2.1 (2022-06-23 ucrt)
    ## Platform: x86_64-w64-mingw32/x64 (64-bit)
    ## Running under: Windows Server x64 (build 20348)
    ##
    ## Matrix products: default
    ##
    ## locale:
    ## [1] LC_COLLATE=C
    ## [2] LC_CTYPE=English_United States.utf8
    ## [3] LC_MONETARY=English_United States.utf8
    ## [4] LC_NUMERIC=C
    ## [5] LC_TIME=English_United States.utf8
    ##
    ## attached base packages:
    ## [1] stats4    stats     graphics  grDevices utils     datasets  methods
    ## [8] base
    ##
    ## other attached packages:
    ##  [1] PCAtools_2.10.0             ggrepel_0.9.1
    ##  [3] ggplot2_3.3.6               scDataviz_1.8.0
    ##  [5] SingleCellExperiment_1.20.0 SummarizedExperiment_1.28.0
    ##  [7] Biobase_2.58.0              GenomicRanges_1.50.0
    ##  [9] GenomeInfoDb_1.34.0         IRanges_2.32.0
    ## [11] MatrixGenerics_1.10.0       matrixStats_0.62.0
    ## [13] S4Vectors_0.36.0            BiocGenerics_0.44.0
    ## [15] kableExtra_1.3.4            knitr_1.40
    ##
    ## loaded via a namespace (and not attached):
    ##   [1] corrplot_0.92             systemfonts_1.0.4
    ##   [3] plyr_1.8.7                igraph_1.3.5
    ##   [5] lazyeval_0.2.2            sp_1.5-0
    ##   [7] splines_4.2.1             flowCore_2.10.0
    ##   [9] BiocParallel_1.32.0       listenv_0.8.0
    ##  [11] scattermore_0.8           digest_0.6.30
    ##  [13] htmltools_0.5.3           fansi_1.0.3
    ##  [15] magrittr_2.0.3            ScaledMatrix_1.6.0
    ##  [17] tensor_1.5                cluster_2.1.4
    ##  [19] ROCR_1.0-11               globals_0.16.1
    ##  [21] svglite_2.1.0             askpass_1.1
    ##  [23] cytolib_2.10.0            spatstat.sparse_3.0-0
    ##  [25] colorspace_2.0-3          rvest_1.0.3
    ##  [27] xfun_0.34                 dplyr_1.0.10
    ##  [29] RCurl_1.98-1.9            jsonlite_1.8.3
    ##  [31] progressr_0.11.0          spatstat.data_3.0-0
    ##  [33] survival_3.4-0            zoo_1.8-11
    ##  [35] glue_1.6.2                polyclip_1.10-4
    ##  [37] gtable_0.3.1              zlibbioc_1.44.0
    ##  [39] XVector_0.38.0            webshot_0.5.4
    ##  [41] leiden_0.4.3              DelayedArray_0.24.0
    ##  [43] BiocSingular_1.14.0       future.apply_1.9.1
    ##  [45] abind_1.4-5               scales_1.2.1
    ##  [47] DBI_1.1.3                 spatstat.random_3.0-0
    ##  [49] miniUI_0.1.1.1            Rcpp_1.0.9
    ##  [51] isoband_0.2.6             viridisLite_0.4.1
    ##  [53] xtable_1.8-4              dqrng_0.3.0
    ##  [55] reticulate_1.26           spatstat.core_2.4-4
    ##  [57] rsvd_1.0.5                umap_0.2.9.0
    ##  [59] htmlwidgets_1.5.4         httr_1.4.4
    ##  [61] RColorBrewer_1.1-3        ellipsis_0.3.2
    ##  [63] Seurat_4.2.0              ica_1.0-3
    ##  [65] farver_2.1.1              pkgconfig_2.0.3
    ##  [67] uwot_0.1.14               sass_0.4.2
    ##  [69] deldir_1.0-6              utf8_1.2.2
    ##  [71] labeling_0.4.2            tidyselect_1.2.0
    ##  [73] rlang_1.0.6               reshape2_1.4.4
    ##  [75] later_1.3.0               munsell_0.5.0
    ##  [77] tools_4.2.1               cachem_1.0.6
    ##  [79] cli_3.4.1                 generics_0.1.3
    ##  [81] ggridges_0.5.4            evaluate_0.17
    ##  [83] stringr_1.4.1             fastmap_1.1.0
    ##  [85] yaml_2.3.6                goftest_1.2-3
    ##  [87] fitdistrplus_1.1-8        purrr_0.3.5
    ##  [89] RANN_2.6.1                sparseMatrixStats_1.10.0
    ##  [91] pbapply_1.5-0             future_1.28.0
    ##  [93] nlme_3.1-160              mime_0.12
    ##  [95] xml2_1.3.3                compiler_4.2.1
    ##  [97] rstudioapi_0.14           plotly_4.10.0
    ##  [99] png_0.1-7                 spatstat.utils_3.0-1
    ## [101] tibble_3.1.8              bslib_0.4.0
    ## [103] stringi_1.7.8             highr_0.9
    ## [105] RSpectra_0.16-1           rgeos_0.5-9
    ## [107] lattice_0.20-45           Matrix_1.5-1
    ## [109] vctrs_0.5.0               pillar_1.8.1
    ## [111] lifecycle_1.0.3           spatstat.geom_3.0-3
    ## [113] lmtest_0.9-40             jquerylib_0.1.4
    ## [115] RcppAnnoy_0.0.20          data.table_1.14.4
    ## [117] cowplot_1.1.1             bitops_1.0-7
    ## [119] irlba_2.3.5.1             httpuv_1.6.6
    ## [121] patchwork_1.1.2           R6_2.5.1
    ## [123] promises_1.2.0.1          RProtoBufLib_2.10.0
    ## [125] KernSmooth_2.23-20        gridExtra_2.3
    ## [127] parallelly_1.32.1         codetools_0.2-18
    ## [129] MASS_7.3-58.1             assertthat_0.2.1
    ## [131] openssl_2.0.4             withr_2.5.0
    ## [133] SeuratObject_4.1.2        sctransform_0.3.5
    ## [135] GenomeInfoDbData_1.2.9    mgcv_1.8-41
    ## [137] parallel_4.2.1            beachmat_2.14.0
    ## [139] rpart_4.1.19              grid_4.2.1
    ## [141] tidyr_1.2.1               DelayedMatrixStats_1.20.0
    ## [143] rmarkdown_2.17            Rtsne_0.16
    ## [145] shiny_1.7.3

# 8 References

﻿Blighe (2020)

Blighe and Lun (2020)

Lun and Risso (2020)

Stuart et al. (2018)

Wickham (2016)

Blighe, K. 2020. “scDataviz: single cell dataviz and downstream analyses.” https://github.com/kevinblighe/scDataviz.

Blighe, K, and A Lun. 2020. “PCAtools: everything Principal Component Analysis.” https://github.com/kevinblighe/PCAtools.

Lun, A, and D Risso. 2020. “SingleCellExperiment: S4 Classes for Single Cell Data.” https://bioconductor.org/packages/SingleCellExperiment.

Stuart, Tim, Andrew Butler, Paul Hoffman, Christoph Hafemeister, Efthymia Papalexi, William M Mauck III, Marlon Stoeckius, Peter Smibert, and Rahul Satija. 2018. “Comprehensive Integration of Single Cell Data.” bioRxiv. https://doi.org/10.1101/460147.

Wickham, H. 2016. “ggplot2: Elegant Graphics for Data Analysis.” Springer-Verlag New York, ISBN: 978-3-319-24277-4.