Contents

1 Load Tabula Muris data

The TabulaMurisData data package provides access to the 10x and SmartSeq2 single-cell RNA-seq data sets from the Tabula Muris Consortium. The contents of the package can be seen by querying the ExperimentHub for the package name.

suppressPackageStartupMessages({
    library(ExperimentHub)
    library(SingleCellExperiment)
    library(TabulaMurisData)
})
#> snapshotDate(): 2022-04-19

eh <- ExperimentHub()
#> snapshotDate(): 2022-04-19
query(eh, "TabulaMurisData")
#> ExperimentHub with 2 records
#> # snapshotDate(): 2022-04-19
#> # $dataprovider: Tabula Muris Consortium
#> # $species: Mus musculus
#> # $rdataclass: SingleCellExperiment
#> # additional mcols(): taxonomyid, genome, description,
#> #   coordinate_1_based, maintainer, rdatadateadded, preparerclass, tags,
#> #   rdatapath, sourceurl, sourcetype 
#> # retrieve records with, e.g., 'object[["EH1617"]]' 
#> 
#>            title               
#>   EH1617 | TabulaMurisDroplet  
#>   EH1618 | TabulaMurisSmartSeq2

The individual data sets can be accessed using either their ExperimentHub accession number, or the convenience functions provided in this package. For example, for the 10x data:

droplet <- eh[["EH1617"]]
#> see ?TabulaMurisData and browseVignettes('TabulaMurisData') for documentation
#> loading from cache
droplet
#> class: SingleCellExperiment 
#> dim: 23341 70118 
#> metadata(0):
#> assays(1): counts
#> rownames(23341): 0610005C13Rik 0610007C21Rik ... Zzef1 Zzz3
#> rowData names(2): ID Symbol
#> colnames(70118): 10X_P4_0_AAACCTGAGATTACCC 10X_P4_0_AAACCTGAGTGCCAGA
#>   ... 10X_P8_15_TTTGTCATCTTACCGC 10X_P8_15_TTTGTCATCTTGTTTG
#> colData names(10): cell channel ... cell_ontology_id free_annotation
#> reducedDimNames(0):
#> mainExpName: NULL
#> altExpNames(0):
droplet <- TabulaMurisDroplet()
#> see ?TabulaMurisData and browseVignettes('TabulaMurisData') for documentation
#> loading from cache
droplet
#> class: SingleCellExperiment 
#> dim: 23341 70118 
#> metadata(0):
#> assays(1): counts
#> rownames(23341): 0610005C13Rik 0610007C21Rik ... Zzef1 Zzz3
#> rowData names(2): ID Symbol
#> colnames(70118): 10X_P4_0_AAACCTGAGATTACCC 10X_P4_0_AAACCTGAGTGCCAGA
#>   ... 10X_P8_15_TTTGTCATCTTACCGC 10X_P8_15_TTTGTCATCTTGTTTG
#> colData names(10): cell channel ... cell_ontology_id free_annotation
#> reducedDimNames(0):
#> mainExpName: NULL
#> altExpNames(0):

2 Explore data with iSEE

Each data set is provided in the form of a SingleCellExperiment object. To gain further insights into the contents of the data sets, they can be explored using, e.g., the iSEE package. For the purposes of this vignette, we first subsample a small subset of the cells in the 10x data set, to reduce the run time.

set.seed(1234)
se <- droplet[, sample(seq_len(ncol(droplet)), 250, replace = FALSE)]
se
#> class: SingleCellExperiment 
#> dim: 23341 250 
#> metadata(0):
#> assays(1): counts
#> rownames(23341): 0610005C13Rik 0610007C21Rik ... Zzef1 Zzz3
#> rowData names(2): ID Symbol
#> colnames(250): 10X_P8_12_ACGGGCTGTCAGAGGT 10X_P7_10_CGTCCATGTTATGCGT
#>   ... 10X_P7_9_TGACAACGTGTAAGTA 10X_P8_14_GATCTAGCACGGCCAT
#> colData names(10): cell channel ... cell_ontology_id free_annotation
#> reducedDimNames(0):
#> mainExpName: NULL
#> altExpNames(0):

Next, we calculate size factors and normalize the data using the scran and scater packages, and perform dimension reduction using PCA and t-SNE.

se <- scran::computeSumFactors(se)
se <- scater::logNormCounts(se)
se <- scater::runPCA(se)
se <- scater::runTSNE(se)

Finally, we call iSEE with the subsampled SingleCellExperiment object. This opens up an instance of iSEE containing the provided data set.

if (require(iSEE)) {
    iSEE(se)
}

3 Session info

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] TabulaMurisData_1.15.0      SingleCellExperiment_1.19.0
#>  [3] SummarizedExperiment_1.27.0 Biobase_2.57.0             
#>  [5] GenomicRanges_1.49.0        GenomeInfoDb_1.33.0        
#>  [7] IRanges_2.31.0              S4Vectors_0.35.0           
#>  [9] MatrixGenerics_1.9.0        matrixStats_0.62.0         
#> [11] ExperimentHub_2.5.0         AnnotationHub_3.5.0        
#> [13] BiocFileCache_2.5.0         dbplyr_2.1.1               
#> [15] BiocGenerics_0.43.0         BiocStyle_2.25.0           
#> 
#> loaded via a namespace (and not attached):
#>   [1] Rtsne_0.16                    ggbeeswarm_0.6.0             
#>   [3] colorspace_2.0-3              ellipsis_0.3.2               
#>   [5] scuttle_1.7.0                 bluster_1.7.0                
#>   [7] XVector_0.37.0                BiocNeighbors_1.15.0         
#>   [9] ggrepel_0.9.1                 bit64_4.0.5                  
#>  [11] interactiveDisplayBase_1.35.0 AnnotationDbi_1.59.0         
#>  [13] fansi_1.0.3                   sparseMatrixStats_1.9.0      
#>  [15] cachem_1.0.6                  knitr_1.38                   
#>  [17] scater_1.25.0                 jsonlite_1.8.0               
#>  [19] cluster_2.1.3                 png_0.1-7                    
#>  [21] shiny_1.7.1                   BiocManager_1.30.17          
#>  [23] compiler_4.2.0                httr_1.4.2                   
#>  [25] dqrng_0.3.0                   assertthat_0.2.1             
#>  [27] Matrix_1.4-1                  fastmap_1.1.0                
#>  [29] limma_3.53.0                  cli_3.3.0                    
#>  [31] later_1.3.0                   BiocSingular_1.13.0          
#>  [33] htmltools_0.5.2               tools_4.2.0                  
#>  [35] rsvd_1.0.5                    igraph_1.3.1                 
#>  [37] gtable_0.3.0                  glue_1.6.2                   
#>  [39] GenomeInfoDbData_1.2.8        dplyr_1.0.8                  
#>  [41] rappdirs_0.3.3                Rcpp_1.0.8.3                 
#>  [43] jquerylib_0.1.4               vctrs_0.4.1                  
#>  [45] Biostrings_2.65.0             DelayedMatrixStats_1.19.0    
#>  [47] xfun_0.30                     stringr_1.4.0                
#>  [49] beachmat_2.13.0               mime_0.12                    
#>  [51] lifecycle_1.0.1               irlba_2.3.5                  
#>  [53] statmod_1.4.36                edgeR_3.39.0                 
#>  [55] zlibbioc_1.43.0               scales_1.2.0                 
#>  [57] promises_1.2.0.1              parallel_4.2.0               
#>  [59] yaml_2.3.5                    curl_4.3.2                   
#>  [61] gridExtra_2.3                 memoise_2.0.1                
#>  [63] ggplot2_3.3.5                 sass_0.4.1                   
#>  [65] stringi_1.7.6                 RSQLite_2.2.12               
#>  [67] BiocVersion_3.16.0            ScaledMatrix_1.5.0           
#>  [69] scran_1.25.0                  filelock_1.0.2               
#>  [71] BiocParallel_1.31.0           rlang_1.0.2                  
#>  [73] pkgconfig_2.0.3               bitops_1.0-7                 
#>  [75] evaluate_0.15                 lattice_0.20-45              
#>  [77] purrr_0.3.4                   bit_4.0.4                    
#>  [79] tidyselect_1.1.2              magrittr_2.0.3               
#>  [81] bookdown_0.26                 R6_2.5.1                     
#>  [83] generics_0.1.2                metapod_1.5.0                
#>  [85] DelayedArray_0.23.0           DBI_1.1.2                    
#>  [87] pillar_1.7.0                  withr_2.5.0                  
#>  [89] KEGGREST_1.37.0               RCurl_1.98-1.6               
#>  [91] tibble_3.1.6                  crayon_1.5.1                 
#>  [93] utf8_1.2.2                    rmarkdown_2.14               
#>  [95] viridis_0.6.2                 locfit_1.5-9.5               
#>  [97] grid_4.2.0                    blob_1.2.3                   
#>  [99] digest_0.6.29                 xtable_1.8-4                 
#> [101] httpuv_1.6.5                  munsell_0.5.0                
#> [103] viridisLite_0.4.0             beeswarm_0.4.0               
#> [105] vipor_0.4.5                   bslib_0.3.1