1 Installation

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

BiocManager::install("SingleCellMultiModal")

1.1 Load packages

library(SingleCellMultiModal)
library(MultiAssayExperiment)

2 scNMT: single-cell nucleosome, methylation and transcription sequencing

The dataset was graciously provided by Argelaguet et al. (2019).

Scripts used to process the raw data were written and maintained by Argelaguet and colleagues and reside on GitHub: https://github.com/rargelaguet/scnmt_gastrulation

For more information on the protocol, see Clark et al. (2018).

2.1 Dataset lookup

The user can see the available datasets by using the dry.run argument:

scNMT("mouse_gastrulation", mode = "*", version = "1.0.0", dry.run = TRUE)
## snapshotDate(): 2022-04-19
##     ah_id         mode file_size rdataclass rdatadateadded rdatadateremoved
## 1  EH3738      acc_cgi      7 Mb     matrix     2020-09-03             <NA>
## 2  EH3739     acc_CTCF    1.2 Mb     matrix     2020-09-03             <NA>
## 3  EH3740      acc_DHS    0.3 Mb     matrix     2020-09-03             <NA>
## 4  EH3741 acc_genebody   49.6 Mb     matrix     2020-09-03             <NA>
## 5  EH3742     acc_p300    0.2 Mb     matrix     2020-09-03             <NA>
## 6  EH3743 acc_promoter   27.2 Mb     matrix     2020-09-03             <NA>
## 7  EH3745      met_cgi    4.6 Mb     matrix     2020-09-03             <NA>
## 8  EH3746     met_CTCF    0.1 Mb     matrix     2020-09-03             <NA>
## 9  EH3747      met_DHS    0.1 Mb     matrix     2020-09-03             <NA>
## 10 EH3748 met_genebody   26.8 Mb     matrix     2020-09-03             <NA>
## 11 EH3749     met_p300    0.1 Mb     matrix     2020-09-03             <NA>
## 12 EH3750 met_promoter   11.5 Mb     matrix     2020-09-03             <NA>
## 13 EH3751          rna   18.6 Mb     matrix     2020-09-03             <NA>

Or by simply running the scNMT function with defaults:

scNMT("mouse_gastrulation", version = "1.0.0")
## snapshotDate(): 2022-04-19
##     ah_id         mode file_size rdataclass rdatadateadded rdatadateremoved
## 1  EH3738      acc_cgi      7 Mb     matrix     2020-09-03             <NA>
## 2  EH3739     acc_CTCF    1.2 Mb     matrix     2020-09-03             <NA>
## 3  EH3740      acc_DHS    0.3 Mb     matrix     2020-09-03             <NA>
## 4  EH3741 acc_genebody   49.6 Mb     matrix     2020-09-03             <NA>
## 5  EH3742     acc_p300    0.2 Mb     matrix     2020-09-03             <NA>
## 6  EH3743 acc_promoter   27.2 Mb     matrix     2020-09-03             <NA>
## 7  EH3745      met_cgi    4.6 Mb     matrix     2020-09-03             <NA>
## 8  EH3746     met_CTCF    0.1 Mb     matrix     2020-09-03             <NA>
## 9  EH3747      met_DHS    0.1 Mb     matrix     2020-09-03             <NA>
## 10 EH3748 met_genebody   26.8 Mb     matrix     2020-09-03             <NA>
## 11 EH3749     met_p300    0.1 Mb     matrix     2020-09-03             <NA>
## 12 EH3750 met_promoter   11.5 Mb     matrix     2020-09-03             <NA>
## 13 EH3751          rna   18.6 Mb     matrix     2020-09-03             <NA>

2.2 Data versions

A more recent release of the ‘mouse_gastrulation’ dataset was provided by Argelaguet and colleagues. This dataset includes additional cells that did not pass the original quality metrics as imposed for the version 1.0.0 dataset.

Use the version argument to indicate the newer dataset version (i.e., 2.0.0):

scNMT("mouse_gastrulation", version = '2.0.0', dry.run = TRUE)
## snapshotDate(): 2022-04-19
##     ah_id         mode file_size rdataclass rdatadateadded rdatadateremoved
## 1  EH3753      acc_cgi   21.1 Mb     matrix     2020-09-03             <NA>
## 2  EH3754     acc_CTCF    1.2 Mb     matrix     2020-09-03             <NA>
## 3  EH3755      acc_DHS   16.2 Mb     matrix     2020-09-03             <NA>
## 4  EH3756 acc_genebody   60.1 Mb     matrix     2020-09-03             <NA>
## 5  EH3757     acc_p300    0.2 Mb     matrix     2020-09-03             <NA>
## 6  EH3758 acc_promoter   33.8 Mb     matrix     2020-09-03             <NA>
## 7  EH3760      met_cgi   12.1 Mb     matrix     2020-09-03             <NA>
## 8  EH3761     met_CTCF    0.1 Mb     matrix     2020-09-03             <NA>
## 9  EH3762      met_DHS    3.9 Mb     matrix     2020-09-03             <NA>
## 10 EH3763 met_genebody   33.9 Mb     matrix     2020-09-03             <NA>
## 11 EH3764     met_p300    0.1 Mb     matrix     2020-09-03             <NA>
## 12 EH3765 met_promoter   18.7 Mb     matrix     2020-09-03             <NA>
## 13 EH3766          rna   43.5 Mb     matrix     2020-09-03             <NA>

2.3 Downloading the data

To obtain the data, we can use the mode argument to indicate specific datasets using ‘glob’ patterns that will match the outputs above. For example, if we would like to have all ‘genebody’ datasets for all available assays, we would use *_genebody as an input to mode.

nmt <- scNMT("mouse_gastrulation", mode = c("*_DHS", "*_cgi", "*_genebody"),
    version = "1.0.0", dry.run = FALSE)
nmt
## A MultiAssayExperiment object of 6 listed
##  experiments with user-defined names and respective classes.
##  Containing an ExperimentList class object of length 6:
##  [1] acc_DHS: matrix with 290 rows and 826 columns
##  [2] met_DHS: matrix with 66 rows and 826 columns
##  [3] acc_cgi: matrix with 4459 rows and 826 columns
##  [4] met_cgi: matrix with 5536 rows and 826 columns
##  [5] acc_genebody: matrix with 17139 rows and 826 columns
##  [6] met_genebody: matrix with 15837 rows and 826 columns
## Functionality:
##  experiments() - obtain the ExperimentList instance
##  colData() - the primary/phenotype DataFrame
##  sampleMap() - the sample coordination DataFrame
##  `$`, `[`, `[[` - extract colData columns, subset, or experiment
##  *Format() - convert into a long or wide DataFrame
##  assays() - convert ExperimentList to a SimpleList of matrices
##  exportClass() - save data to flat files

2.4 Checking the cell metadata

Included in the colData DataFrame within the MultiAssayExperiment class are the variables cellID, stage, lineage10x_2, and stage_lineage. To extract this DataFrame, one has to use colData on the MultiAssayExperiment object:

colData(nmt)
## DataFrame with 826 rows and 4 columns
##                            cellID       stage     lineage10x_2
##                       <character> <character>      <character>
## E7.5_Plate1_A3     E7.5_Plate1_A3        E7.5         Endoderm
## E7.5_Plate1_H3     E7.5_Plate1_H3        E7.5         Endoderm
## E7.5_Plate1_D2     E7.5_Plate1_D2        E7.5         Endoderm
## E7.5_Plate1_D7     E7.5_Plate1_D7        E7.5         Endoderm
## E7.5_Plate1_F5     E7.5_Plate1_F5        E7.5         Endoderm
## ...                           ...         ...              ...
## PS_VE_Plate9_C11 PS_VE_Plate9_C11        E6.5         Epiblast
## PS_VE_Plate9_E11 PS_VE_Plate9_E11        E6.5         Epiblast
## PS_VE_Plate9_D11 PS_VE_Plate9_D11        E6.5 Primitive_Streak
## PS_VE_Plate9_A11 PS_VE_Plate9_A11        E6.5 Primitive_Streak
## PS_VE_Plate9_B11 PS_VE_Plate9_B11        E6.5         Mesoderm
##                          stage_lineage
##                            <character>
## E7.5_Plate1_A3           E7.5_Endoderm
## E7.5_Plate1_H3           E7.5_Endoderm
## E7.5_Plate1_D2           E7.5_Endoderm
## E7.5_Plate1_D7           E7.5_Endoderm
## E7.5_Plate1_F5           E7.5_Endoderm
## ...                                ...
## PS_VE_Plate9_C11         E6.5_Epiblast
## PS_VE_Plate9_E11         E6.5_Epiblast
## PS_VE_Plate9_D11 E6.5_Primitive_Streak
## PS_VE_Plate9_A11 E6.5_Primitive_Streak
## PS_VE_Plate9_B11         E6.5_Mesoderm

2.5 Exploring the data structure

Check row annotations:

rownames(nmt)
## CharacterList of length 6
## [["acc_DHS"]] ESC_DHS_118970 ESC_DHS_118919 ... ESC_DHS_68996 ESC_DHS_109494
## [["met_DHS"]] ESC_DHS_20778 ESC_DHS_14504 ... ESC_DHS_72133 ESC_DHS_72129
## [["acc_cgi"]] CGI_5278 CGI_6058 CGI_10627 ... CGI_7832 CGI_11329 CGI_10964
## [["met_cgi"]] CGI_3481 CGI_8941 CGI_956 CGI_9461 ... CGI_2867 CGI_3499 CGI_365
## [["acc_genebody"]] ENSMUSG00000036181 ENSMUSG00000071862 ... ENSMUSG00000025576
## [["met_genebody"]] ENSMUSG00000059334 ENSMUSG00000024026 ... ENSMUSG00000078302

The sampleMap is a graph representation of the relationships between cells and ‘assay’ datasets:

sampleMap(nmt)
## DataFrame with 4956 rows and 3 columns
##             assay                primary                colname
##          <factor>            <character>            <character>
## 1    met_genebody E4.5-5.5_new_Plate1_.. E4.5-5.5_new_Plate1_..
## 2    met_genebody E4.5-5.5_new_Plate1_.. E4.5-5.5_new_Plate1_..
## 3    met_genebody E4.5-5.5_new_Plate1_.. E4.5-5.5_new_Plate1_..
## 4    met_genebody E4.5-5.5_new_Plate1_.. E4.5-5.5_new_Plate1_..
## 5    met_genebody E4.5-5.5_new_Plate1_.. E4.5-5.5_new_Plate1_..
## ...           ...                    ...                    ...
## 4952      acc_DHS       PS_VE_Plate9_G05       PS_VE_Plate9_G05
## 4953      acc_DHS       PS_VE_Plate9_G08       PS_VE_Plate9_G08
## 4954      acc_DHS       PS_VE_Plate9_G09       PS_VE_Plate9_G09
## 4955      acc_DHS       PS_VE_Plate9_G12       PS_VE_Plate9_G12
## 4956      acc_DHS       PS_VE_Plate9_H08       PS_VE_Plate9_H08

Take a look at the cell identifiers or barcodes across assays:

colnames(nmt)
## CharacterList of length 6
## [["acc_DHS"]] E4.5-5.5_new_Plate1_A02 ... PS_VE_Plate9_H08
## [["met_DHS"]] E4.5-5.5_new_Plate1_A02 ... PS_VE_Plate9_H08
## [["acc_cgi"]] E4.5-5.5_new_Plate1_A02 ... PS_VE_Plate9_H08
## [["met_cgi"]] E4.5-5.5_new_Plate1_A02 ... PS_VE_Plate9_H08
## [["acc_genebody"]] E4.5-5.5_new_Plate1_A02 ... PS_VE_Plate9_H08
## [["met_genebody"]] E4.5-5.5_new_Plate1_A02 ... PS_VE_Plate9_H08

2.6 Chromatin Accessibility (acc_*)

See the accessibilty levels (as proportions) for DNase Hypersensitive Sites:

head(assay(nmt, "acc_DHS"))[, 1:4]
##                E4.5-5.5_new_Plate1_A02 E4.5-5.5_new_Plate1_A04
## ESC_DHS_118970              0.66666667                      NA
## ESC_DHS_118919              0.76190476                      NA
## ESC_DHS_66330               0.81818182               0.7142857
## ESC_DHS_43318                       NA               0.8000000
## ESC_DHS_6229                0.85714286               0.8000000
## ESC_DHS_9413                0.06666667               0.6800000
##                E4.5-5.5_new_Plate1_A07 E4.5-5.5_new_Plate1_A08
## ESC_DHS_118970                      NA               0.2631579
## ESC_DHS_118919               0.3636364               0.8421053
## ESC_DHS_66330                0.7391304               0.6086957
## ESC_DHS_43318                0.5000000               0.8888889
## ESC_DHS_6229                 0.3333333               0.7142857
## ESC_DHS_9413                 0.2142857               0.5217391

2.7 DNA Methylation (met_*)

See the methylation percentage / proportion:

head(assay(nmt, "met_DHS"))[, 1:4]
##                E4.5-5.5_new_Plate1_A02 E4.5-5.5_new_Plate1_A04
## ESC_DHS_20778                0.8000000                      NA
## ESC_DHS_14504                0.8000000                     0.8
## ESC_DHS_112143                      NA                     0.4
## ESC_DHS_34593                0.6666667                     0.6
## ESC_DHS_20747                0.4000000                     0.6
## ESC_DHS_33671                       NA                     0.6
##                E4.5-5.5_new_Plate1_A07 E4.5-5.5_new_Plate1_A08
## ESC_DHS_20778                0.8571429               0.8000000
## ESC_DHS_14504                0.8000000               0.6000000
## ESC_DHS_112143               0.5714286               0.5000000
## ESC_DHS_34593                0.7142857               0.8000000
## ESC_DHS_20747                       NA               0.6000000
## ESC_DHS_33671                0.8333333               0.6666667

For protocol information, see the references below.

3 sessionInfo

sessionInfo()
## R version 4.2.0 RC (2022-04-21 r82226)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 20.04.4 LTS
## 
## Matrix products: default
## BLAS:   /home/biocbuild/bbs-3.16-bioc/R/lib/libRblas.so
## LAPACK: /home/biocbuild/bbs-3.16-bioc/R/lib/libRlapack.so
## 
## 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       
## 
## attached base packages:
## [1] stats4    stats     graphics  grDevices utils     datasets  methods  
## [8] base     
## 
## other attached packages:
##  [1] scater_1.25.0               ggplot2_3.3.5              
##  [3] scran_1.25.0                scuttle_1.7.0              
##  [5] rhdf5_2.41.0                SingleCellExperiment_1.19.0
##  [7] RaggedExperiment_1.21.0     SingleCellMultiModal_1.9.0 
##  [9] MultiAssayExperiment_1.23.0 SummarizedExperiment_1.27.0
## [11] Biobase_2.57.0              GenomicRanges_1.49.0       
## [13] GenomeInfoDb_1.33.0         IRanges_2.31.0             
## [15] S4Vectors_0.35.0            BiocGenerics_0.43.0        
## [17] MatrixGenerics_1.9.0        matrixStats_0.62.0         
## [19] BiocStyle_2.25.0           
## 
## loaded via a namespace (and not attached):
##   [1] AnnotationHub_3.5.0           BiocFileCache_2.5.0          
##   [3] plyr_1.8.7                    igraph_1.3.1                 
##   [5] BiocParallel_1.31.0           digest_0.6.29                
##   [7] htmltools_0.5.2               viridis_0.6.2                
##   [9] magick_2.7.3                  fansi_1.0.3                  
##  [11] magrittr_2.0.3                memoise_2.0.1                
##  [13] ScaledMatrix_1.5.0            SpatialExperiment_1.7.0      
##  [15] cluster_2.1.3                 limma_3.53.0                 
##  [17] Biostrings_2.65.0             R.utils_2.11.0               
##  [19] colorspace_2.0-3              blob_1.2.3                   
##  [21] rappdirs_0.3.3                ggrepel_0.9.1                
##  [23] xfun_0.30                     dplyr_1.0.8                  
##  [25] crayon_1.5.1                  RCurl_1.98-1.6               
##  [27] jsonlite_1.8.0                glue_1.6.2                   
##  [29] gtable_0.3.0                  zlibbioc_1.43.0              
##  [31] XVector_0.37.0                UpSetR_1.4.0                 
##  [33] DelayedArray_0.23.0           BiocSingular_1.13.0          
##  [35] DropletUtils_1.17.0           Rhdf5lib_1.19.0              
##  [37] HDF5Array_1.25.0              scales_1.2.0                 
##  [39] DBI_1.1.2                     edgeR_3.39.0                 
##  [41] Rcpp_1.0.8.3                  viridisLite_0.4.0            
##  [43] xtable_1.8-4                  dqrng_0.3.0                  
##  [45] bit_4.0.4                     rsvd_1.0.5                   
##  [47] metapod_1.5.0                 httr_1.4.2                   
##  [49] ellipsis_0.3.2                farver_2.1.0                 
##  [51] pkgconfig_2.0.3               R.methodsS3_1.8.1            
##  [53] uwot_0.1.11                   sass_0.4.1                   
##  [55] dbplyr_2.1.1                  locfit_1.5-9.5               
##  [57] utf8_1.2.2                    labeling_0.4.2               
##  [59] tidyselect_1.1.2              rlang_1.0.2                  
##  [61] later_1.3.0                   AnnotationDbi_1.59.0         
##  [63] munsell_0.5.0                 BiocVersion_3.16.0           
##  [65] tools_4.2.0                   cachem_1.0.6                 
##  [67] cli_3.3.0                     generics_0.1.2               
##  [69] RSQLite_2.2.12                ExperimentHub_2.5.0          
##  [71] evaluate_0.15                 stringr_1.4.0                
##  [73] fastmap_1.1.0                 yaml_2.3.5                   
##  [75] knitr_1.38                    bit64_4.0.5                  
##  [77] purrr_0.3.4                   KEGGREST_1.37.0              
##  [79] sparseMatrixStats_1.9.0       mime_0.12                    
##  [81] formatR_1.12                  R.oo_1.24.0                  
##  [83] compiler_4.2.0                beeswarm_0.4.0               
##  [85] filelock_1.0.2                curl_4.3.2                   
##  [87] png_0.1-7                     interactiveDisplayBase_1.35.0
##  [89] tibble_3.1.6                  statmod_1.4.36               
##  [91] bslib_0.3.1                   stringi_1.7.6                
##  [93] highr_0.9                     RSpectra_0.16-1              
##  [95] lattice_0.20-45               bluster_1.7.0                
##  [97] Matrix_1.4-1                  vctrs_0.4.1                  
##  [99] pillar_1.7.0                  lifecycle_1.0.1              
## [101] rhdf5filters_1.9.0            BiocManager_1.30.17          
## [103] jquerylib_0.1.4               RcppAnnoy_0.0.19             
## [105] BiocNeighbors_1.15.0          cowplot_1.1.1                
## [107] bitops_1.0-7                  irlba_2.3.5                  
## [109] httpuv_1.6.5                  R6_2.5.1                     
## [111] bookdown_0.26                 promises_1.2.0.1             
## [113] gridExtra_2.3                 vipor_0.4.5                  
## [115] codetools_0.2-18              assertthat_0.2.1             
## [117] rjson_0.2.21                  withr_2.5.0                  
## [119] GenomeInfoDbData_1.2.8        parallel_4.2.0               
## [121] grid_4.2.0                    beachmat_2.13.0              
## [123] rmarkdown_2.14                DelayedMatrixStats_1.19.0    
## [125] shiny_1.7.1                   ggbeeswarm_0.6.0

References

Argelaguet, Ricard, Stephen J Clark, Hisham Mohammed, L Carine Stapel, Christel Krueger, Chantriolnt-Andreas Kapourani, Ivan Imaz-Rosshandler, et al. 2019. “Multi-Omics Profiling of Mouse Gastrulation at Single-Cell Resolution.” Nature 576 (7787): 487–91.

Clark, Stephen J, Ricard Argelaguet, Chantriolnt-Andreas Kapourani, Thomas M Stubbs, Heather J Lee, Celia Alda-Catalinas, Felix Krueger, et al. 2018. “scNMT-seq Enables Joint Profiling of Chromatin Accessibility DNA Methylation and Transcription in Single Cells.” Nat. Commun. 9 (1): 781.