1 clustifyrdatahub

clustifyrdatahub provides external reference data sets for cell-type assignment with clustifyr.

1.1 Installation

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

BiocManager::install("clustifyrdatahub")

1.2 Available references include

knitr::kable(dplyr::select(
  read.csv(system.file("extdata", "metadata.csv", package = "clustifyrdatahub")),
  c(1, 9, 2:7)))
Title Species Description RDataPath BiocVersion Genome SourceType SourceUrl
ref_MCA Mus musculus Mouse Cell Atlas clustifyrdatahub/ref_MCA.rda 3.12 mm10 Zip https://ndownloader.figshare.com/files/10756795
ref_tabula_muris_drop Mus musculus Tabula Muris (10X) clustifyrdatahub/ref_tabula_muris_drop.rda 3.12 mm10 Zip https://ndownloader.figshare.com/articles/5821263
ref_tabula_muris_facs Mus musculus Tabula Muris (SmartSeq2) clustifyrdatahub/ref_tabula_muris_facs.rda 3.12 mm10 Zip https://ndownloader.figshare.com/articles/5821263
ref_mouse.rnaseq Mus musculus Mouse RNA-seq from 28 cell types clustifyrdatahub/ref_mouse.rnaseq.rda 3.12 mm10 RDA https://github.com/dviraran/SingleR/tree/master/data
ref_moca_main Mus musculus Mouse Organogenesis Cell Atlas (main cell types) clustifyrdatahub/ref_moca_main.rda 3.12 mm10 RDA https://oncoscape.v3.sttrcancer.org/atlas.gs.washington.edu.mouse.rna/downloads
ref_immgen Mus musculus Mouse sorted immune cells clustifyrdatahub/ref_immgen.rda 3.12 mm10 RDA https://github.com/dviraran/SingleR/tree/master/data
ref_hema_microarray Homo sapiens Human hematopoietic cell microarray clustifyrdatahub/ref_hema_microarray.rda 3.12 hg38 TXT https://ftp.ncbi.nlm.nih.gov/geo/series/GSE24nnn/GSE24759/matrix/GSE24759_series_matrix.txt.gz
ref_cortex_dev Homo sapiens Human cortex development scRNA-seq clustifyrdatahub/ref_cortex_dev.rda 3.12 hg38 TSV https://cells.ucsc.edu/cortex-dev/exprMatrix.tsv.gz
ref_pan_indrop Homo sapiens Human pancreatic cell scRNA-seq (inDrop) clustifyrdatahub/ref_pan_indrop.rda 3.12 hg38 RDA https://scrnaseq-public-datasets.s3.amazonaws.com/scater-objects/baron-human.rds
ref_pan_smartseq2 Homo sapiens Human pancreatic cell scRNA-seq (SmartSeq2) clustifyrdatahub/ref_pan_smartseq2.rda 3.12 hg38 RDA https://scrnaseq-public-datasets.s3.amazonaws.com/scater-objects/segerstolpe.rds
ref_mouse_atlas Mus musculus Mouse Atlas scRNA-seq from 321 cell types clustifyrdatahub/ref_mouse_atlas.rda 3.12 mm10 RDA https://github.com/rnabioco/scRNA-seq-Cell-Ref-Matrix/blob/master/atlas/musMusculus/MouseAtlas.rda

1.3 To use clustifyrdatahub

library(ExperimentHub)
eh <- ExperimentHub()

## query
refs <- query(eh, "clustifyrdatahub")
refs
#> ExperimentHub with 11 records
#> # snapshotDate(): 2021-10-18
#> # $dataprovider: figshare, S3, GitHub, GEO, washington.edu, UCSC
#> # $species: Mus musculus, Homo sapiens
#> # $rdataclass: data.frame
#> # additional mcols(): taxonomyid, genome, description,
#> #   coordinate_1_based, maintainer, rdatadateadded, preparerclass, tags,
#> #   rdatapath, sourceurl, sourcetype 
#> # retrieve records with, e.g., 'object[["EH3444"]]' 
#> 
#>            title                
#>   EH3444 | ref_MCA              
#>   EH3445 | ref_tabula_muris_drop
#>   EH3446 | ref_tabula_muris_facs
#>   EH3447 | ref_mouse.rnaseq     
#>   EH3448 | ref_moca_main        
#>   ...      ...                  
#>   EH3450 | ref_hema_microarray  
#>   EH3451 | ref_cortex_dev       
#>   EH3452 | ref_pan_indrop       
#>   EH3453 | ref_pan_smartseq2    
#>   EH3779 | ref_mouse_atlas
## either by index or id
ref_hema_microarray <- refs[[7]]         ## load the first resource in the list
ref_hema_microarray <- refs[["EH3450"]]  ## load by EH id

## or list and load
refs <- listResources(eh, "clustifyrdatahub")
ref_hema_microarray <- loadResources(
    eh, 
    "clustifyrdatahub",
    "ref_hema_microarray"
    )[[1]]

## use for classification of cell types
res <- clustifyr::clustify(
    input = clustifyr::pbmc_matrix_small,
    metadata = clustifyr::pbmc_meta$classified,
    ref_mat = ref_hema_microarray,
    query_genes = clustifyr::pbmc_vargenes
)
## or load refs by function name (after loading hub library)
library(clustifyrdatahub)
ref_hema_microarray()[1:5, 1:5]           ## data are loaded
#>        Basophils CD4+ Central Memory CD4+ Effector Memory CD8+ Central Memory
#> DDR1    6.084244            5.967502             5.933039            6.005278
#> RFC2    6.280044            6.028615             6.047005            5.992979
#> HSPA6   6.535444            5.811475             5.746326            5.928349
#> PAX8    6.669153            5.896401             6.118577            6.270870
#> GUCA1A  5.239230            5.232116             5.206960            5.227415
#>        CD8+ Effector Memory
#> DDR1               5.895926
#> RFC2               5.942426
#> HSPA6              5.942670
#> PAX8               6.323922
#> GUCA1A             5.090882
ref_hema_microarray(metadata = TRUE)      ## only metadata
#> ExperimentHub with 1 record
#> # snapshotDate(): 2021-10-18
#> # names(): EH3450
#> # package(): clustifyrdatahub
#> # $dataprovider: GEO
#> # $species: Homo sapiens
#> # $rdataclass: data.frame
#> # $rdatadateadded: 2020-05-14
#> # $title: ref_hema_microarray
#> # $description: Human hematopoietic cell microarray
#> # $taxonomyid: 9606
#> # $genome: hg38
#> # $sourcetype: TXT
#> # $sourceurl: https://ftp.ncbi.nlm.nih.gov/geo/series/GSE24nnn/GSE24759/matr...
#> # $sourcesize: NA
#> # $tags: c("SingleCellData", "SequencingData", "MicroarrayData",
#> #   "ExperimentHub") 
#> # retrieve record with 'object[["EH3450"]]'

2 session info

sessionInfo()
#> R version 4.1.1 (2021-08-10)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: Ubuntu 20.04.3 LTS
#> 
#> Matrix products: default
#> BLAS:   /home/biocbuild/bbs-3.14-bioc/R/lib/libRblas.so
#> LAPACK: /home/biocbuild/bbs-3.14-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] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> other attached packages:
#> [1] clustifyrdatahub_1.4.0 ExperimentHub_2.2.0    AnnotationHub_3.2.0   
#> [4] BiocFileCache_2.2.0    dbplyr_2.1.1           BiocGenerics_0.40.0   
#> [7] BiocStyle_2.22.0      
#> 
#> loaded via a namespace (and not attached):
#>  [1] bitops_1.0-7                  matrixStats_0.61.0           
#>  [3] bit64_4.0.5                   filelock_1.0.2               
#>  [5] httr_1.4.2                    GenomeInfoDb_1.30.0          
#>  [7] tools_4.1.1                   bslib_0.3.1                  
#>  [9] utf8_1.2.2                    R6_2.5.1                     
#> [11] DBI_1.1.1                     colorspace_2.0-2             
#> [13] withr_2.4.2                   gridExtra_2.3                
#> [15] tidyselect_1.1.1              bit_4.0.4                    
#> [17] curl_4.3.2                    compiler_4.1.1               
#> [19] Biobase_2.54.0                DelayedArray_0.20.0          
#> [21] entropy_1.3.1                 bookdown_0.24                
#> [23] sass_0.4.0                    scales_1.1.1                 
#> [25] rappdirs_0.3.3                stringr_1.4.0                
#> [27] digest_0.6.28                 rmarkdown_2.11               
#> [29] XVector_0.34.0                pkgconfig_2.0.3              
#> [31] htmltools_0.5.2               MatrixGenerics_1.6.0         
#> [33] fastmap_1.1.0                 highr_0.9                    
#> [35] rlang_0.4.12                  RSQLite_2.2.8                
#> [37] shiny_1.7.1                   jquerylib_0.1.4              
#> [39] generics_0.1.1                jsonlite_1.7.2               
#> [41] BiocParallel_1.28.0           dplyr_1.0.7                  
#> [43] clustifyr_1.6.0               RCurl_1.98-1.5               
#> [45] magrittr_2.0.1                GenomeInfoDbData_1.2.7       
#> [47] Matrix_1.3-4                  Rcpp_1.0.7                   
#> [49] munsell_0.5.0                 S4Vectors_0.32.0             
#> [51] fansi_0.5.0                   lifecycle_1.0.1              
#> [53] stringi_1.7.5                 yaml_2.2.1                   
#> [55] SummarizedExperiment_1.24.0   zlibbioc_1.40.0              
#> [57] grid_4.1.1                    blob_1.2.2                   
#> [59] parallel_4.1.1                promises_1.2.0.1             
#> [61] crayon_1.4.1                  lattice_0.20-45              
#> [63] Biostrings_2.62.0             cowplot_1.1.1                
#> [65] KEGGREST_1.34.0               knitr_1.36                   
#> [67] pillar_1.6.4                  fgsea_1.20.0                 
#> [69] GenomicRanges_1.46.0          stats4_4.1.1                 
#> [71] fastmatch_1.1-3               glue_1.4.2                   
#> [73] BiocVersion_3.14.0            evaluate_0.14                
#> [75] data.table_1.14.2             BiocManager_1.30.16          
#> [77] png_0.1-7                     vctrs_0.3.8                  
#> [79] httpuv_1.6.3                  tidyr_1.1.4                  
#> [81] gtable_0.3.0                  purrr_0.3.4                  
#> [83] assertthat_0.2.1              cachem_1.0.6                 
#> [85] ggplot2_3.3.5                 xfun_0.27                    
#> [87] mime_0.12                     xtable_1.8-4                 
#> [89] later_1.3.0                   SingleCellExperiment_1.16.0  
#> [91] tibble_3.1.5                  AnnotationDbi_1.56.1         
#> [93] memoise_2.0.0                 IRanges_2.28.0               
#> [95] ellipsis_0.3.2                interactiveDisplayBase_1.32.0