The allenpvc
data set is the supplementary data of
GSE71585
encapsulated in a SingleCellExperiment
object. It is a celular taxonomy of the
primary visual cortex in adult mice based on single cell RNA-sequencing from
Tasic et al. 2016
performed by the Allen Institute for Brain Science. In said study 49
transcriptomic cell types are identified.
The package can be installed using the chunk below.
BiocManager::install("allenpvc")
The supplementary files were downloaded from the NCBI website. Those are csv
files with count, RPKM, and TPM gene expression data for each cell. They were
processed using R and were encapsulated in a SingleCellExperiment
(SCE) data.
The original data had a small cell name mis-formatting that was easily corrected. Lastly, the expression for spike-in genes were available only in RPKM and counts, but not in TPM. Since this information was included in the SCE, the expression for those genes in the TPM matrix were filled with NAs.
This data set can be downloaded from the ExperimentHub.
library(allenpvc)
## Loading required package: AnnotationHub
## Loading required package: BiocGenerics
## Loading required package: parallel
##
## Attaching package: 'BiocGenerics'
## The following objects are masked from 'package:parallel':
##
## clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
## clusterExport, clusterMap, parApply, parCapply, parLapply,
## parLapplyLB, parRapply, parSapply, parSapplyLB
## The following objects are masked from 'package:stats':
##
## IQR, mad, sd, var, xtabs
## The following objects are masked from 'package:base':
##
## Filter, Find, Map, Position, Reduce, anyDuplicated, append,
## as.data.frame, basename, cbind, colnames, dirname, do.call,
## duplicated, eval, evalq, get, grep, grepl, intersect,
## is.unsorted, lapply, mapply, match, mget, order, paste, pmax,
## pmax.int, pmin, pmin.int, rank, rbind, rownames, sapply,
## setdiff, sort, table, tapply, union, unique, unsplit, which,
## which.max, which.min
## Loading required package: BiocFileCache
## Loading required package: dbplyr
## Loading required package: ExperimentHub
## Loading required package: SingleCellExperiment
## Loading required package: SummarizedExperiment
## Loading required package: GenomicRanges
## Loading required package: stats4
## Loading required package: S4Vectors
##
## Attaching package: 'S4Vectors'
## The following object is masked from 'package:base':
##
## expand.grid
## Loading required package: IRanges
## Loading required package: GenomeInfoDb
## Loading required package: Biobase
## Welcome to Bioconductor
##
## Vignettes contain introductory material; view with
## 'browseVignettes()'. To cite Bioconductor, see
## 'citation("Biobase")', and for packages 'citation("pkgname")'.
##
## Attaching package: 'Biobase'
## The following object is masked from 'package:ExperimentHub':
##
## cache
## The following object is masked from 'package:AnnotationHub':
##
## cache
## Loading required package: DelayedArray
## Loading required package: matrixStats
##
## Attaching package: 'matrixStats'
## The following objects are masked from 'package:Biobase':
##
## anyMissing, rowMedians
## Loading required package: BiocParallel
##
## Attaching package: 'DelayedArray'
## The following objects are masked from 'package:matrixStats':
##
## colMaxs, colMins, colRanges, rowMaxs, rowMins, rowRanges
## The following objects are masked from 'package:base':
##
## aperm, apply, rowsum
## Warning: Package 'allenpvc' is deprecated and will be removed from
## Bioconductor version 3.11
apvc <- allenpvc()
## snapshotDate(): 2019-10-22
## see ?allenpvc and browseVignettes('allenpvc') for documentation
## loading from cache
The gene expression data can be retrieved using the assay
construct. The
chunk below retrieves the count matrix, if you wish to retrieve the RPKM or the
TPM matrix just replace the "counts"
argument of assay
with "rpkm"
or
"tpm"
.
head(assay(apvc, "counts")[, 1:5])
## Calb2_tdTpositive_cell_1 Calb2_tdTpositive_cell_2
## 0610005C13Rik 0.00 0.00
## 0610007C21Rik 992.00 2287.02
## 0610007L01Rik 2.57 177.00
## 0610007N19Rik 0.00 0.00
## 0610007P08Rik 0.00 0.00
## 0610007P14Rik 0.00 816.00
## Calb2_tdTpositive_cell_3 Calb2_tdTpositive_cell_4
## 0610005C13Rik 0.00 0.00
## 0610007C21Rik 491.78 1932.00
## 0610007L01Rik 0.00 1.00
## 0610007N19Rik 0.00 0.00
## 0610007P08Rik 0.00 0.00
## 0610007P14Rik 84.00 1662.18
## Calb2_tdTpositive_cell_5
## 0610005C13Rik 0.00
## 0610007C21Rik 1425.00
## 0610007L01Rik 2.00
## 0610007N19Rik 0.00
## 0610007P08Rik 0.00
## 0610007P14Rik 2825.15
This data set also contains some important metadata, including cell type annotation of the samples and whether they passed the QC check performed in Tasic et al.. As well as many other useful information such as the Cre line driver and the neuron broad type.
head(colData(apvc))
## DataFrame with 6 rows and 12 columns
## mouse_line cre_driver_1 cre_driver_2
## <factor> <factor> <factor>
## Calb2_tdTpositive_cell_1 Calb2 Calb2-IRES-Cre
## Calb2_tdTpositive_cell_2 Calb2 Calb2-IRES-Cre
## Calb2_tdTpositive_cell_3 Calb2 Calb2-IRES-Cre
## Calb2_tdTpositive_cell_4 Calb2 Calb2-IRES-Cre
## Calb2_tdTpositive_cell_5 Calb2 Calb2-IRES-Cre
## Calb2_tdTpositive_cell_6 Calb2 Calb2-IRES-Cre
## cre_reporter dissection tdTomato pass_qc_checks
## <factor> <factor> <factor> <factor>
## Calb2_tdTpositive_cell_1 RCL-tdT (Ai14) All positive Y
## Calb2_tdTpositive_cell_2 RCL-tdT (Ai14) All positive Y
## Calb2_tdTpositive_cell_3 RCL-tdT (Ai14) All positive Y
## Calb2_tdTpositive_cell_4 RCL-tdT (Ai14) All positive Y
## Calb2_tdTpositive_cell_5 RCL-tdT (Ai14) All positive Y
## Calb2_tdTpositive_cell_6 RCL-tdT (Ai14) All positive Y
## broad_type core_intermediate primary_type
## <factor> <factor> <factor>
## Calb2_tdTpositive_cell_1 GABA-ergic Neuron core Vip Mybpc1
## Calb2_tdTpositive_cell_2 GABA-ergic Neuron core Vip Parm1
## Calb2_tdTpositive_cell_3 Glutamatergic Neuron core L4 Ctxn3
## Calb2_tdTpositive_cell_4 GABA-ergic Neuron core Vip Chat
## Calb2_tdTpositive_cell_5 GABA-ergic Neuron core Vip Parm1
## Calb2_tdTpositive_cell_6 Glutamatergic Neuron core L2/3 Ptgs2
## secondary_type aibs_vignette_id
## <factor> <factor>
## Calb2_tdTpositive_cell_1 A200_V
## Calb2_tdTpositive_cell_2 A201_V
## Calb2_tdTpositive_cell_3 A202_V
## Calb2_tdTpositive_cell_4 A203_V
## Calb2_tdTpositive_cell_5 A204_V
## Calb2_tdTpositive_cell_6 A205_V
Primary (cell) type of the first 20 cells.
head(apvc$primary_type, 20)
## Calb2_tdTpositive_cell_1 Calb2_tdTpositive_cell_2
## Vip Mybpc1 Vip Parm1
## Calb2_tdTpositive_cell_3 Calb2_tdTpositive_cell_4
## L4 Ctxn3 Vip Chat
## Calb2_tdTpositive_cell_5 Calb2_tdTpositive_cell_6
## Vip Parm1 L2/3 Ptgs2
## Calb2_tdTpositive_cell_7 Calb2_tdTpositive_cell_8
## L2 Ngb L2/3 Ptgs2
## Calb2_tdTpositive_cell_9 Calb2_tdTpositive_cell_10
## L4 Ctxn3 L2 Ngb
## Calb2_tdTpositive_cell_11 Calb2_tdTpositive_cell_12
## Pvalb Gpx3 L2/3 Ptgs2
## Calb2_tdTpositive_cell_13 Calb2_tdTpositive_cell_14
## Vip Chat L2/3 Ptgs2
## Calb2_tdTpositive_cell_15 Calb2_tdTpositive_cell_16
## Vip Parm1 Ndnf Cxcl14
## Calb2_tdTpositive_cell_17 Calb2_tdTpositive_cell_18
## Vip Gpc3 Vip Chat
## Calb2_tdTpositive_cell_19 Calb2_tdTpositive_cell_20
## Vip Chat Vip Gpc3
## 50 Levels: Astro Gja1 Endo Myl9 Endo Tbc1d4 Igtp L2/3 Ptgs2 ... Vip Sncg
Broad type of the first 20 cells.
head(apvc$broad_type, 20)
## Calb2_tdTpositive_cell_1 Calb2_tdTpositive_cell_2
## GABA-ergic Neuron GABA-ergic Neuron
## Calb2_tdTpositive_cell_3 Calb2_tdTpositive_cell_4
## Glutamatergic Neuron GABA-ergic Neuron
## Calb2_tdTpositive_cell_5 Calb2_tdTpositive_cell_6
## GABA-ergic Neuron Glutamatergic Neuron
## Calb2_tdTpositive_cell_7 Calb2_tdTpositive_cell_8
## Glutamatergic Neuron Glutamatergic Neuron
## Calb2_tdTpositive_cell_9 Calb2_tdTpositive_cell_10
## Glutamatergic Neuron Glutamatergic Neuron
## Calb2_tdTpositive_cell_11 Calb2_tdTpositive_cell_12
## GABA-ergic Neuron Glutamatergic Neuron
## Calb2_tdTpositive_cell_13 Calb2_tdTpositive_cell_14
## GABA-ergic Neuron Glutamatergic Neuron
## Calb2_tdTpositive_cell_15 Calb2_tdTpositive_cell_16
## GABA-ergic Neuron GABA-ergic Neuron
## Calb2_tdTpositive_cell_17 Calb2_tdTpositive_cell_18
## GABA-ergic Neuron GABA-ergic Neuron
## Calb2_tdTpositive_cell_19 Calb2_tdTpositive_cell_20
## GABA-ergic Neuron GABA-ergic Neuron
## 8 Levels: Astrocyte Endothelial Cell ... Unclassified
Any metadata information can be accessed through the $
operator
directly from the SCE object. But in the chunk below we are subsetting more than
one column, thus, we must reference colData
. The output shows the Cre line and
QC check flag of some cells.
head(colData(apvc)[, c("cre_driver_1", "pass_qc_checks")])
## DataFrame with 6 rows and 2 columns
## cre_driver_1 pass_qc_checks
## <factor> <factor>
## Calb2_tdTpositive_cell_1 Calb2-IRES-Cre Y
## Calb2_tdTpositive_cell_2 Calb2-IRES-Cre Y
## Calb2_tdTpositive_cell_3 Calb2-IRES-Cre Y
## Calb2_tdTpositive_cell_4 Calb2-IRES-Cre Y
## Calb2_tdTpositive_cell_5 Calb2-IRES-Cre Y
## Calb2_tdTpositive_cell_6 Calb2-IRES-Cre Y
This data set has information on the expression of spike-in genes. In the study ERCC spike-ins were used as well as the tdTomato. These genes are included in the same matrices as the endogenous genes, hence, it might be desirable to split the assay matrix.
The chunk below shows an example of splitting the count matrix. As previously mentioned, the spike-in expression for TPM is not available in the original supplementary data and, for said assay, is filled with NAs.
apvc_endo <- apvc[!isSpike(apvc),]
## Warning: 'isSpike' is deprecated.
## See help("Deprecated")
apvc_endo
## class: SingleCellExperiment
## dim: 24057 1809
## metadata(0):
## assays(3): counts tpm rpkm
## rownames(24057): 0610005C13Rik 0610007C21Rik ... mt_X57779 mt_X57780
## rowData names(0):
## colnames(1809): Calb2_tdTpositive_cell_1 Calb2_tdTpositive_cell_2
## ... Rbp4_CTX_250ng_2 Trib2_CTX_250ng_1
## colData names(12): mouse_line cre_driver_1 ... secondary_type
## aibs_vignette_id
## reducedDimNames(0):
## spikeNames(2): ERCC tdTomato
## altExpNames(0):
apvc_spike <- apvc[isSpike(apvc),]
## Warning: 'isSpike' is deprecated.
## See help("Deprecated")
apvc_spike
## class: SingleCellExperiment
## dim: 93 1809
## metadata(0):
## assays(3): counts tpm rpkm
## rownames(93): ERCC-00002 ERCC-00003 ... ERCC-00171 tdTomato
## rowData names(0):
## colnames(1809): Calb2_tdTpositive_cell_1 Calb2_tdTpositive_cell_2
## ... Rbp4_CTX_250ng_2 Trib2_CTX_250ng_1
## colData names(12): mouse_line cre_driver_1 ... secondary_type
## aibs_vignette_id
## reducedDimNames(0):
## spikeNames(2): ERCC tdTomato
## altExpNames(0):
## R version 3.6.1 (2019-07-05)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 18.04.3 LTS
##
## Matrix products: default
## BLAS: /home/biocbuild/bbs-3.10-bioc/R/lib/libRblas.so
## LAPACK: /home/biocbuild/bbs-3.10-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] stats4 parallel stats graphics grDevices utils datasets
## [8] methods base
##
## other attached packages:
## [1] allenpvc_1.4.0 SingleCellExperiment_1.8.0
## [3] SummarizedExperiment_1.16.0 DelayedArray_0.12.0
## [5] BiocParallel_1.20.0 matrixStats_0.55.0
## [7] Biobase_2.46.0 GenomicRanges_1.38.0
## [9] GenomeInfoDb_1.22.0 IRanges_2.20.0
## [11] S4Vectors_0.24.0 ExperimentHub_1.12.0
## [13] AnnotationHub_2.18.0 BiocFileCache_1.10.0
## [15] dbplyr_1.4.2 BiocGenerics_0.32.0
## [17] BiocStyle_2.14.0
##
## loaded via a namespace (and not attached):
## [1] Rcpp_1.0.2 lattice_0.20-38
## [3] assertthat_0.2.1 zeallot_0.1.0
## [5] digest_0.6.22 mime_0.7
## [7] R6_2.4.0 backports_1.1.5
## [9] RSQLite_2.1.2 evaluate_0.14
## [11] httr_1.4.1 pillar_1.4.2
## [13] zlibbioc_1.32.0 rlang_0.4.1
## [15] curl_4.2 blob_1.2.0
## [17] Matrix_1.2-17 rmarkdown_1.16
## [19] stringr_1.4.0 RCurl_1.95-4.12
## [21] bit_1.1-14 shiny_1.4.0
## [23] compiler_3.6.1 httpuv_1.5.2
## [25] xfun_0.10 pkgconfig_2.0.3
## [27] htmltools_0.4.0 tidyselect_0.2.5
## [29] tibble_2.1.3 GenomeInfoDbData_1.2.2
## [31] interactiveDisplayBase_1.24.0 bookdown_0.14
## [33] crayon_1.3.4 dplyr_0.8.3
## [35] later_1.0.0 bitops_1.0-6
## [37] rappdirs_0.3.1 grid_3.6.1
## [39] xtable_1.8-4 DBI_1.0.0
## [41] magrittr_1.5 stringi_1.4.3
## [43] XVector_0.26.0 promises_1.1.0
## [45] vctrs_0.2.0 tools_3.6.1
## [47] bit64_0.9-7 glue_1.3.1
## [49] purrr_0.3.3 BiocVersion_3.10.1
## [51] fastmap_1.0.1 yaml_2.2.0
## [53] AnnotationDbi_1.48.0 BiocManager_1.30.9
## [55] memoise_1.1.0 knitr_1.25
Tasic, Bosiljka, et al. “Adult mouse cortical cell taxonomy revealed by single cell transcriptomics.” Nature neuroscience 19.2 (2016): 335.