Single-cell gene expression file contents
Single-cell or single-nuclei gene expression data (unfiltered, filtered, or processed) is provided for use with R as an RDS file containing a SingleCellExperiment
object.
This object contains the expression data, cell and gene metrics, associated metadata, and, in the case of multimodal data like ADTs from CITE-seq experiments, data from additional cell-based assays.
We highly encourage you to familiarize yourself with the general object structure and functions available as part of the SingleCellExperiment
package from Bioconductor.
Below we present some details about the specific contents of the objects we provide.
To begin, you will need to load the SingleCellExperiment
package and read the RDS file:
library(SingleCellExperiment)
sce <- readRDS("SCPCL000000_processed.rds")
Components of a SingleCellExperiment
object
Expression counts
The counts
assay of the SingleCellExperiment
object for single-cell and single-nuclei experiments (for all provided file types) contains the primary RNA-seq expression data as integer counts.
The counts here include reads aligned to both spliced and unspliced cDNA (see the section on Post Alevin-fry processing).
The data is stored as a sparse matrix, and each column represents a cell or droplet, each row a gene.
Column names are cell barcode sequences and row names are Ensembl gene IDs.
The counts
assay can be accessed with the following R code:
count_matrix <- counts(sce)
Additionally, the spliced
assay contains a counts matrix that includes reads from spliced cDNA only.
Cell metrics
Cell metrics calculated from the RNA-seq expression data are stored as a DataFrame
in the colData
slot, with the cell barcodes as the names of the rows.
cell_metrics <- colData(sce)
The following per-cell data columns are included for each cell, calculated using the scuttle::addPerCellQCMetrics()
function.
Column name |
Contents |
---|---|
|
UMI count for RNA-seq data |
|
Number of genes detected (gene count > 0 ) |
|
UMI count of mitochondrial genes |
|
Number of mitochondrial genes detected |
|
Percent of all UMI counts assigned to mitochondrial genes |
|
Total UMI count for RNA-seq data and any alternative experiments (i.e., ADT data from CITE-seq) |
The following additional per-cell data columns are included in both the filtered
and processed
objects.
These columns include metrics calculated by miQC
, a package that jointly models proportion of reads belonging to mitochondrial genes and number of unique genes detected to predict low-quality cells.
We also include the filtering results used for the creation of the processed
objects.
See the description of the processed gene expression data for more information on filtering performed to create the processed
objects.
Column name |
Contents |
---|---|
|
Probability that a cell is compromised (i.e., dead or damaged), as calculated by |
|
Indicates whether the cell passed the default miQC filtering. |
|
Labels cells as either |
|
If CITE-seq was performed, labels cells as either |
Gene information and metrics
Gene information and metrics calculated from the RNA-seq expression data are stored as a DataFrame
in the rowData
slot, with the Ensembl ID as the names of the rows.
gene_info <- rowData(sce)
The following columns are included for all genes.
Metrics were calculated using the scuttle::addPerFeatureQCMetrics
function.
Column name |
Contents |
---|---|
|
HUGO gene symbol, if defined |
|
Mean count across all cells/droplets |
|
Percent of cells in which the gene was detected (gene count > 0 ) |
Experiment metadata
Metadata associated with data processing is included in the metadata
slot as a list.
expt_metadata <- metadata(sce)
Item name |
Contents |
---|---|
|
Version of |
|
Transcriptome reference file used for mapping |
|
Total number of reads processed by |
|
Number of reads successfully mapped |
|
Pipeline used for mapping and quantification ( |
|
Version of |
|
|
|
|
|
Boolean indicating whether quantification was done using |
|
Number of cells reported by |
|
A string indicating the technology and version used for the single-cell library, such as 10Xv2, 10Xv3, or 10Xv3.1 |
|
Transcripts included in gene counts: |
|
The model object that |
|
The method used for cell filtering. One of |
|
The minimum UMI count per cell used as a threshold for removing empty droplets. Only present for |
|
The minimum cutoff for the probability of a cell being compromised, as calculated by |
|
Method used by the Data Lab to filter low quality cells prior to normalization. Either |
|
If CITE-seq was performed, the method used by the Data Lab to identify cells to be filtered prior to normalization, based on ADT counts. Either |
|
The minimum cutoff for the number of unique genes detected per cell. Only present for |
|
The method used for normalization of raw RNA counts. Either |
|
If CITE-seq was performed, the method used for normalization of raw ADT counts. Either |
|
A list of highly variable genes used for dimensionality reduction, determined using |
Dimensionality reduction results
In the RDS file containing the processed SingleCellExperiment
object only (_processed.rds
), the reducedDim
slot of the object will be occupied with both principal component analysis (PCA
) and UMAP
results.
For all other files, the reducedDim
slot will be empty as no dimensionality reduction was performed.
PCA results were calculated using scater::runPCA()
, using only highly variable genes.
The list of highly variable genes used was selected using scran::modelGeneVar
and scran::getTopHVGs
, and are stored in the SingleCellExperiment
object in metadata(sce)$highly_variable_genes
.
The following command can be used to access the PCA results:
reducedDim(sce, "PCA")
UMAP results were calculated using scater::runUMAP()
, with the PCA results as input rather than the full gene expression matrix.
The following command can be used to access the UMAP results:
reducedDim(sce,"UMAP")
Additional SingleCellExperiment components for multiplexed libraries
Multiplexed libraries will contain a number of additional components and fields.
Hashtag oligo (HTO) quantification for each cell is included within the SingleCellExperiment
as an “Alternative Experiment” named "cellhash"
, which can be accessed with the following command:
altExp(sce, "cellhash")
Within this, the main data matrix is again found in the counts
assay, with each column corresponding to a cell or droplet (in the same order as the parent SingleCellExperiment
) and each row corresponding to a hashtag oligo (HTO).
Column names are again cell barcode sequences and row names the HTO ids for all assayed HTOs.
The following additional per-cell data columns for the cellhash data can be found in the main colData
data frame (accessed with colData(sce)
as above).
Column name |
Contents |
---|---|
|
UMI count for cellhash HTOs |
|
Number of HTOs detected per cell (HTO count > 0 ) |
|
Percent of |
Metrics for each of the HTOs assayed can be found as a DataFrame
stored as rowData
within the alternative experiment:
hto_info <- rowData(altExp(sce, "cellhash"))
This data frame contains the following columns with statistics for each HTO:
Column name |
Contents |
---|---|
|
Mean HTO count across all cells/droplets |
|
Percent of cells in which the HTO was detected (HTO count > 0 ) |
|
Sample ID for this library that corresponds to the HTO (only present in |
Note that in the unfiltered SingleCellExperiment
objects, this may include hashtag oligos that do not correspond to any included sample, but were part of the reference set used for mapping.
Demultiplexing results
Demultiplexing results are included only in the _filtered.rds
files.
The demultiplexing methods applied for these files are as described in the multiplex data processing section.
Demultiplexing analysis adds the following additional fields to the colData(sce)
data frame:
Column name |
Contents |
---|---|
|
Most likely sample as called by |
|
Most likely sample as called by |
|
Most likely sample as called by |
Additional demultiplexing statistics
Each demultiplexing method generates additional statistics specific to the method that you may wish to access, including probabilities, alternative calls, and potential doublet information.
For methods that rely on the HTO data, these statistics are found in the colData(altExp(sce, "cellhash"))
data frame;
DropletUtils::hashedDrops()
statistics have the prefix hashedDrops_
and Seurat::HTODemux()
statistics have the prefix HTODemux
.
Genetic demultiplexing statistics are found in the main colData(sce)
data frame, with the prefix vireo_
.