Current build status
Recent advances in single cell RNA-seq (scRNA-seq) have enabled an unprecedented level of granularity in characterizing gene expression changes in disease models. Multiple single cell analysis methodologies have been developed to detect gene expression changes and to cluster cells by similarity of gene expression. However, the classification of clusters by cell type relies heavily on known marker genes, and the annotation of clusters is performed manually. This strategy suffers from subjectivity and limits adequate differentiation of closely related cell subsets. Here, we present SingleR, a novel computational method for unbiased cell type recognition of scRNA-seq. SingleR leverages reference transcriptomic datasets of pure cell types to infer the cell of origin of each of the single cells independently.
For more informations please refer to the manuscript: Aran, Looney, Liu et al. Reference-based analysis of lung single-cell sequencing reveals a transitional profibrotic macrophage. Nature Immunology (2019)
This repository contains a simplified, more performant version of SingleR
.
The original repository containing the legacy version can be found here.
This version does not support the browser application that accompanied the original version.
This is the development version of the R/Bioconductor package SingleR. It may contain unstable or untested new features. If you are looking for the release version of this package please go to its official Bioconductor landing page and follow the instructions there to install it.
If you were really looking for this development version, then you can install it via:
install.packages("BiocManager")
BiocManager::install("SingleR", version = "devel")
Alternatively, you can install it from GitHub using the devtools package.
install.packages("devtools")
library(devtools)
install_github("SingleR-inc/SingleR")
The SingleR()
function annotates each cell in a test dataset given a reference dataset with known labels. Documentation and basic examples can be accessed with ?SingleR
.
Both basic and advanced examples can be found in the SingleR book.
SingleR()
is made to be workflow/package agnostic - if you can get a matrix of normalized counts, you can use it.
SingleCellExperiment
objects can be used directly.
Seurat
objects can be converted to SingleCellExperiment
objects via Seurat's as.SingleCellExperiment()
function or their normalized counts can be retrieved via GetAssayData
or FetchData
.
SingleR
results labels can be easily added back to the metadata of these objects as well:
seurat.obj[["SingleR.labels"]] <- singler.results$labels
# Or if `method="cluster"` was used:
seurat.obj[["SingleR.cluster.labels"]] <-
singler.results$labels[match(seurat.obj[[]][["my.input.clusters"]], rownames(singler.results))]
SingleR
performs well on large numbers of cells - annotating 100k cells with fine-grain labels typically takes under an hour using a single processing core.
Using broad labels can reduce the time to under 15 minutes, though run times will vary between datasets and the reference dataset used.
SingleR was originally developed by Dvir Aran. This refactor was initiated by Aaron Lun, with additional contributions from Daniel Bunis, Friederike Dündar, and Jared Andrews.
Issues and pull requests are welcome.