Chapter 13 Messmer human ESC (Smart-seq2)

13.1 Introduction

This performs an analysis of the human embryonic stem cell (hESC) dataset generated with Smart-seq2 (Messmer et al. 2019), which contains several plates of naive and primed hESCs. The chapter’s code is based on the steps in the paper’s GitHub repository, with some additional steps for cell cycle effect removal contributed by Philippe Boileau.

13.7 Batch correction

We eliminate the obvious batch effect between batches with linear regression, which is possible due to the replicated nature of the experimental design. We set keep=1:2 to retain the effect of the first two coefficients in design corresponding to our phenotype of interest.

13.8 Dimensionality Reduction

We could have set d= and subset.row= in correctExperiments() to automatically perform a PCA on the the residual matrix with the subset of HVGs, but we’ll just explicitly call runPCA() here to keep things simple.

From a naive PCA, the cell cycle appears to be a major source of biological variation within each phenotype.

Obligatory $t$-SNE plots of the Messmer hESC dataset, where each point is a cell and is colored by various attributes.

Figure 13.5: Obligatory \(t\)-SNE plots of the Messmer hESC dataset, where each point is a cell and is colored by various attributes.

We perform contrastive PCA (cPCA) and sparse cPCA (scPCA) on the corrected log-expression data to obtain the same number of PCs. Given that the naive hESCs are actually reprogrammed primed hESCs, we will use the single batch of primed-only hESCs as the “background” dataset to remove the cell cycle effect.

We see greater intermingling between phases within both the naive and primed cells after cPCA and scPCA.

More $t$-SNE plots of the Messmer hESC dataset after cPCA and scPCA, where each point is a cell and is colored by its assigned cell cycle phase.

Figure 13.6: More \(t\)-SNE plots of the Messmer hESC dataset after cPCA and scPCA, where each point is a cell and is colored by its assigned cell cycle phase.

We can quantify the change in the separation between phases within each phenotype using the silhouette coefficient.

##   naive  primed 
## 0.02032 0.03025
##    naive   primed 
## 0.007696 0.011941
##    naive   primed 
## 0.006614 0.014601

Session Info

R version 4.2.1 (2022-06-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.5 LTS

Matrix products: default
BLAS:   /home/biocbuild/bbs-3.15-bioc/R/lib/
LAPACK: /home/biocbuild/bbs-3.15-bioc/R/lib/

 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_GB              LC_COLLATE=C              
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            

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

other attached packages:
 [1] bluster_1.6.0               scPCA_1.10.0               
 [3] batchelor_1.12.3            scran_1.24.1               
 [5] scater_1.24.0               ggplot2_3.3.6              
 [7] scuttle_1.6.3               AnnotationHub_3.4.0        
 [9] BiocFileCache_2.4.0         dbplyr_2.2.1               
[11] ensembldb_2.20.2            AnnotationFilter_1.20.0    
[13] GenomicFeatures_1.48.4      AnnotationDbi_1.58.0       
[15] scRNAseq_2.10.0             SingleCellExperiment_1.18.1
[17] SummarizedExperiment_1.26.1 Biobase_2.56.0             
[19] GenomicRanges_1.48.0        GenomeInfoDb_1.32.4        
[21] IRanges_2.30.1              S4Vectors_0.34.0           
[23] BiocGenerics_0.42.0         MatrixGenerics_1.8.1       
[25] matrixStats_0.62.0          BiocStyle_2.24.0           
[27] rebook_1.6.0               

loaded via a namespace (and not attached):
  [1] utf8_1.2.2                    tidyselect_1.2.0             
  [3] RSQLite_2.2.18                grid_4.2.1                   
  [5] BiocParallel_1.30.4           Rtsne_0.16                   
  [7] munsell_0.5.0                 ScaledMatrix_1.4.1           
  [9] codetools_0.2-18              statmod_1.4.37               
 [11] future_1.28.0                 withr_2.5.0                  
 [13] colorspace_2.0-3              filelock_1.0.2               
 [15] highr_0.9                     knitr_1.40                   
 [17] listenv_0.8.0                 Rdpack_2.4                   
 [19] labeling_0.4.2                GenomeInfoDbData_1.2.8       
 [21] bit64_4.0.5                   farver_2.1.1                 
 [23] parallelly_1.32.1             vctrs_0.4.2                  
 [25] generics_0.1.3                xfun_0.33                    
 [27] R6_2.5.1                      ggbeeswarm_0.6.0             
 [29] rsvd_1.0.5                    locfit_1.5-9.6               
 [31] bitops_1.0-7                  cachem_1.0.6                 
 [33] DelayedArray_0.22.0           assertthat_0.2.1             
 [35] promises_1.2.0.1              BiocIO_1.6.0                 
 [37] scales_1.2.1                  beeswarm_0.4.0               
 [39] gtable_0.3.1                  beachmat_2.12.0              
 [41] globals_0.16.1                rlang_1.0.6                  
 [43] coop_0.6-3                    rtracklayer_1.56.1           
 [45] lazyeval_0.2.2                BiocManager_1.30.18          
 [47] yaml_2.3.5                    abind_1.4-5                  
 [49] httpuv_1.6.6                  tools_4.2.1                  
 [51] bookdown_0.29                 ellipsis_0.3.2               
 [53] jquerylib_0.1.4               Rcpp_1.0.9                   
 [55] sparseMatrixStats_1.8.0       progress_1.2.2               
 [57] zlibbioc_1.42.0               purrr_0.3.5                  
 [59] RCurl_1.98-1.9                prettyunits_1.1.1            
 [61] viridis_0.6.2                 cowplot_1.1.1                
 [63] ggrepel_0.9.1                 cluster_2.1.4                
 [65] magrittr_2.0.3                data.table_1.14.2            
 [67] RSpectra_0.16-1               ResidualMatrix_1.6.1         
 [69] sparsepca_0.1.2               ProtGenerics_1.28.0          
 [71] hms_1.1.2                     mime_0.12                    
 [73] evaluate_0.17                 xtable_1.8-4                 
 [75] XML_3.99-0.11                 gridExtra_2.3                
 [77] compiler_4.2.1                biomaRt_2.52.0               
 [79] tibble_3.1.8                  KernSmooth_2.23-20           
 [81] crayon_1.5.2                  htmltools_0.5.3              
 [83] later_1.3.0                   origami_1.0.5                
 [85] DBI_1.1.3                     ExperimentHub_2.4.0          
 [87] rappdirs_0.3.3                Matrix_1.5-1                 
 [89] cli_3.4.1                     rbibutils_2.2.9              
 [91] parallel_4.2.1                metapod_1.4.0                
 [93] igraph_1.3.5                  pkgconfig_2.0.3              
 [95] GenomicAlignments_1.32.1      dir.expiry_1.4.0             
 [97] xml2_1.3.3                    vipor_0.4.5                  
 [99] bslib_0.4.0                   dqrng_0.3.0                  
[101] XVector_0.36.0                stringr_1.4.1                
[103] digest_0.6.29                 graph_1.74.0                 
[105] Biostrings_2.64.1             rmarkdown_2.17               
[107] edgeR_3.38.4                  DelayedMatrixStats_1.18.2    
[109] restfulr_0.0.15               curl_4.3.3                   
[111] kernlab_0.9-31                shiny_1.7.2                  
[113] Rsamtools_2.12.0              rjson_0.2.21                 
[115] lifecycle_1.0.3               jsonlite_1.8.2               
[117] BiocNeighbors_1.14.0          CodeDepends_0.6.5            
[119] viridisLite_0.4.1             limma_3.52.4                 
[121] fansi_1.0.3                   pillar_1.8.1                 
[123] lattice_0.20-45               KEGGREST_1.36.3              
[125] fastmap_1.1.0                 httr_1.4.4                   
[127] interactiveDisplayBase_1.34.0 glue_1.6.2                   
[129] png_0.1-7                     BiocVersion_3.15.2           
[131] bit_4.0.4                     stringi_1.7.8                
[133] sass_0.4.2                    blob_1.2.3                   
[135] BiocSingular_1.12.0           memoise_2.0.1                
[137] dplyr_1.0.10                  irlba_2.3.5.1                
[139] future.apply_1.9.1           


Messmer, T., F. von Meyenn, A. Savino, F. Santos, H. Mohammed, A. T. L. Lun, J. C. Marioni, and W. Reik. 2019. “Transcriptional heterogeneity in naive and primed human pluripotent stem cells at single-cell resolution.” Cell Rep 26 (4): 815–24.