Chapter 33 Segerstolpe human pancreas (Smart-seq2)

33.1 Introduction

This performs an analysis of the Segerstolpe et al. (2016) dataset, consisting of human pancreas cells from various donors.

33.3 Quality control

We remove low quality cells that were marked by the authors. We then perform additional quality control as some of the remaining cells still have very low counts and numbers of detected features. For some batches that seem to have a majority of low-quality cells (Figure 33.1), we use the other batches to define an appropriate threshold via subset=.

Distribution of each QC metric across cells from each donor of the Segerstolpe pancreas dataset. Each point represents a cell and is colored according to whether that cell was discarded.

Figure 33.1: Distribution of each QC metric across cells from each donor of the Segerstolpe pancreas dataset. Each point represents a cell and is colored according to whether that cell was discarded.

##              low_lib_size            low_n_features high_altexps_ERCC_percent 
##                       788                      1056                      1031 
##                   discard 
##                      1246

33.4 Normalization

We don’t normalize the spike-ins at this point as there are some cells with no spike-in counts.

##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.014   0.390   0.708   1.000   1.332  11.182
Relationship between the library size factors and the deconvolution size factors in the Segerstolpe pancreas dataset.

Figure 33.2: Relationship between the library size factors and the deconvolution size factors in the Segerstolpe pancreas dataset.

33.5 Variance modelling

We do not use cells with no spike-ins for variance modelling. Donor AZ also has very low spike-in counts and is subsequently ignored.

Per-gene variance as a function of the mean for the log-expression values in the Grun pancreas dataset. Each point represents a gene (black) with the mean-variance trend (blue) fitted to the spike-in transcripts (red) separately for each donor.

Figure 33.3: Per-gene variance as a function of the mean for the log-expression values in the Grun pancreas dataset. Each point represents a gene (black) with the mean-variance trend (blue) fitted to the spike-in transcripts (red) separately for each donor.

33.6 Dimensionality reduction

We pick the first 25 PCs for downstream analyses, as it’s a nice square number.

33.7 Clustering

We see a strong donor effect in Figures 33.4 and 30.3. This might be due to differences in cell type composition between donors, but the more likely explanation is that of a technical difference in plate processing or uninteresting genotypic differences. The implication is that we should have called fastMNN() at some point.

Heatmap of the frequency of cells from each donor in each cluster.

Figure 33.4: Heatmap of the frequency of cells from each donor in each cluster.

Obligatory $t$-SNE plots of the Segerstolpe pancreas dataset. Each point represents a cell that is colored by cluster (left) or batch (right).

Figure 33.5: Obligatory \(t\)-SNE plots of the Segerstolpe pancreas dataset. Each point represents a cell that is colored by cluster (left) or batch (right).

33.8 Data integration

We repeat the clustering after running fastMNN() on the donors. This yields a more coherent set of clusters in Figure 33.6 where each cluster contains contributions from all donors.

##        Donor
## Cluster  AZ HP1502401 HP1504101T2D HP1504901 HP1506401 HP1507101 HP1508501T2D
##       1   3        19            3        11        67         8           78
##       2  14        53           13        19        37        41           20
##       3   2         2            1         1        44         1            1
##       4   2        18            7         3        36         2           28
##       5  29       114          140        72        26       136          121
##       6   8        21            9         6         2         6            6
##       7   1         1            1         9         0         1            2
##       8   2         1            3        10         2         6           12
##       9   4        20           70         8        16         2            8
##        Donor
## Cluster HP1509101 HP1525301T2D HP1526901T2D
##       1        27          124           46
##       2        14           11           70
##       3         0            1            4
##       4         2           23            9
##       5        49           85           96
##       6        11            5           34
##       7         2            2            1
##       8         3           13            4
##       9         1           10           34
Yet another $t$-SNE plot of the Segerstolpe dataset, this time after batch correction across donors. Each point represents a cell and is colored by the assigned cluster identity.

Figure 33.6: Yet another \(t\)-SNE plot of the Segerstolpe dataset, this time after batch correction across donors. Each point represents a cell and is colored by the assigned cluster identity.

33.9 Multi-sample comparisons

This particular dataset contains both healthy donors and those with type II diabetes. It is thus of some interest to identify genes that are differentially expressed upon disease in each cell type. To keep things simple, we use the author-provided annotation rather than determining the cell type for each of our clusters.

## class: SingleCellExperiment 
## dim: 25454 105 
## metadata(0):
## assays(1): counts
## rownames(25454): ENSG00000118473 ENSG00000142920 ... ENSG00000278306
##   eGFP
## rowData names(2): symbol refseq
## colnames: NULL
## colData names(9): CellType Disease ... CellType ncells
## reducedDimNames(2): PCA TSNE
## altExpNames(1): ERCC

Here, we will use the voom pipeline from the limma package instead of the QL approach with edgeR. This allows us to use sample weights to better account for the variation in the precision of each pseudo-bulk profile. We see that insulin is downregulated in beta cells in the disease state, which is sensible enough.

##                    symbol  logFC AveExpr      t   P.Value adj.P.Val     B
## ENSG00000254647       INS -2.728  16.680 -7.671 3.191e-06   0.03902 4.842
## ENSG00000137731     FXYD2 -2.595   7.265 -6.705 1.344e-05   0.08219 3.353
## ENSG00000169297     NR0B1 -2.092   6.790 -5.789 5.810e-05   0.09916 1.984
## ENSG00000181029   TRAPPC5 -2.127   7.046 -5.678 7.007e-05   0.09916 1.877
## ENSG00000105707       HPN -1.803   6.118 -5.654 7.298e-05   0.09916 1.740
## LOC284889       LOC284889 -2.113   6.652 -5.515 9.259e-05   0.09916 1.571

We also create some diagnostic plots to check for potential problems in the analysis. The MA plots exhibit the expected shape (Figure 33.7) while the differences in the sample weights in Figure 33.8 justify the use of voom() in this context.

MA plots for the beta cell pseudo-bulk profiles. Each MA plot is generated by comparing the corresponding pseudo-bulk profile against the average of all other profiles

Figure 33.7: MA plots for the beta cell pseudo-bulk profiles. Each MA plot is generated by comparing the corresponding pseudo-bulk profile against the average of all other profiles

Diagnostic plots for `voom` after estimating observation and quality weights from the beta cell pseudo-bulk profiles. The left plot shows the mean-variance trend used to estimate the observation weights, while the right plot shows the per-sample quality weights.

Figure 33.8: Diagnostic plots for voom after estimating observation and quality weights from the beta cell pseudo-bulk profiles. The left plot shows the mean-variance trend used to estimate the observation weights, while the right plot shows the per-sample quality weights.

Session Info

R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.1 LTS

Matrix products: default
BLAS:   /home/biocbuild/bbs-3.12-bioc/R/lib/libRblas.so
LAPACK: /home/biocbuild/bbs-3.12-bioc/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        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       

attached base packages:
[1] parallel  stats4    stats     graphics  grDevices utils     datasets 
[8] methods   base     

other attached packages:
 [1] edgeR_3.32.0                limma_3.46.0               
 [3] batchelor_1.6.0             pheatmap_1.0.12            
 [5] bluster_1.0.0               BiocSingular_1.6.0         
 [7] scran_1.18.0                scater_1.18.0              
 [9] ggplot2_3.3.2               ensembldb_2.14.0           
[11] AnnotationFilter_1.14.0     GenomicFeatures_1.42.0     
[13] AnnotationDbi_1.52.0        AnnotationHub_2.22.0       
[15] BiocFileCache_1.14.0        dbplyr_1.4.4               
[17] scRNAseq_2.4.0              SingleCellExperiment_1.12.0
[19] SummarizedExperiment_1.20.0 Biobase_2.50.0             
[21] GenomicRanges_1.42.0        GenomeInfoDb_1.26.0        
[23] IRanges_2.24.0              S4Vectors_0.28.0           
[25] BiocGenerics_0.36.0         MatrixGenerics_1.2.0       
[27] matrixStats_0.57.0          BiocStyle_2.18.0           
[29] rebook_1.0.0               

loaded via a namespace (and not attached):
  [1] igraph_1.2.6                  lazyeval_0.2.2               
  [3] BiocParallel_1.24.0           digest_0.6.27                
  [5] htmltools_0.5.0               viridis_0.5.1                
  [7] magrittr_1.5                  memoise_1.1.0                
  [9] Biostrings_2.58.0             askpass_1.1                  
 [11] prettyunits_1.1.1             colorspace_1.4-1             
 [13] blob_1.2.1                    rappdirs_0.3.1               
 [15] xfun_0.19                     dplyr_1.0.2                  
 [17] callr_3.5.1                   crayon_1.3.4                 
 [19] RCurl_1.98-1.2                graph_1.68.0                 
 [21] glue_1.4.2                    gtable_0.3.0                 
 [23] zlibbioc_1.36.0               XVector_0.30.0               
 [25] DelayedArray_0.16.0           scales_1.1.1                 
 [27] DBI_1.1.0                     Rcpp_1.0.5                   
 [29] viridisLite_0.3.0             xtable_1.8-4                 
 [31] progress_1.2.2                dqrng_0.2.1                  
 [33] bit_4.0.4                     rsvd_1.0.3                   
 [35] ResidualMatrix_1.0.0          httr_1.4.2                   
 [37] RColorBrewer_1.1-2            ellipsis_0.3.1               
 [39] pkgconfig_2.0.3               XML_3.99-0.5                 
 [41] farver_2.0.3                  scuttle_1.0.0                
 [43] CodeDepends_0.6.5             locfit_1.5-9.4               
 [45] tidyselect_1.1.0              labeling_0.4.2               
 [47] rlang_0.4.8                   later_1.1.0.1                
 [49] munsell_0.5.0                 BiocVersion_3.12.0           
 [51] tools_4.0.3                   generics_0.1.0               
 [53] RSQLite_2.2.1                 ExperimentHub_1.16.0         
 [55] evaluate_0.14                 stringr_1.4.0                
 [57] fastmap_1.0.1                 yaml_2.2.1                   
 [59] processx_3.4.4                knitr_1.30                   
 [61] bit64_4.0.5                   purrr_0.3.4                  
 [63] sparseMatrixStats_1.2.0       mime_0.9                     
 [65] xml2_1.3.2                    biomaRt_2.46.0               
 [67] compiler_4.0.3                beeswarm_0.2.3               
 [69] curl_4.3                      interactiveDisplayBase_1.28.0
 [71] tibble_3.0.4                  statmod_1.4.35               
 [73] stringi_1.5.3                 highr_0.8                    
 [75] ps_1.4.0                      lattice_0.20-41              
 [77] ProtGenerics_1.22.0           Matrix_1.2-18                
 [79] vctrs_0.3.4                   pillar_1.4.6                 
 [81] lifecycle_0.2.0               BiocManager_1.30.10          
 [83] BiocNeighbors_1.8.0           cowplot_1.1.0                
 [85] bitops_1.0-6                  irlba_2.3.3                  
 [87] httpuv_1.5.4                  rtracklayer_1.50.0           
 [89] R6_2.5.0                      bookdown_0.21                
 [91] promises_1.1.1                gridExtra_2.3                
 [93] vipor_0.4.5                   codetools_0.2-16             
 [95] assertthat_0.2.1              openssl_1.4.3                
 [97] withr_2.3.0                   GenomicAlignments_1.26.0     
 [99] Rsamtools_2.6.0               GenomeInfoDbData_1.2.4       
[101] hms_0.5.3                     grid_4.0.3                   
[103] beachmat_2.6.0                rmarkdown_2.5                
[105] DelayedMatrixStats_1.12.0     Rtsne_0.15                   
[107] shiny_1.5.0                   ggbeeswarm_0.6.0             

Bibliography

Segerstolpe, A., A. Palasantza, P. Eliasson, E. M. Andersson, A. C. Andreasson, X. Sun, S. Picelli, et al. 2016. “Single-Cell Transcriptome Profiling of Human Pancreatic Islets in Health and Type 2 Diabetes.” Cell Metab. 24 (4): 593–607.