scgate
marker-based purification of cell types from single-cell RNA-seq datasets
Science Score: 39.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 2 DOI reference(s) in README -
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.9%) to scientific vocabulary
Keywords
Repository
marker-based purification of cell types from single-cell RNA-seq datasets
Basic Info
Statistics
- Stars: 121
- Watchers: 5
- Forks: 13
- Open Issues: 5
- Releases: 7
Topics
Metadata Files
README.md
scGate: marker-based purification of cell types from heterogeneous single-cell RNA-seq datasets
scGate is an R package that automatizes the typical manual marker-based approach to cell type annotation, to enable accurate and intuitive purification of a cell population of interest from a complex scRNA-seq dataset, without requiring reference gene expression profiles or training data. scGate works with any scRNA-seq technology and with other single-cell modalities.
scGate builds upon UCell for robust single-cell signature scoring and Seurat, a comprehensive and powerful framework for single-cell omics analysis.
Briefly, scGate takes as input: i) a gene expression matrix stored in a Seurat object and ii) a “gating model” (GM), consisting of a set of marker genes that define the cell population of interest. The GM can be as simple as a single marker gene, or a combination of positive and negative markers. More complex GMs can be constructed in a hierarchical fashion, akin to gating strategies employed in flow cytometry.
scGate evaluates the strength of signature marker expression in each cell using the rank-based method UCell, and then performs k-nearest neighbor (kNN) smoothing by calculating the mean UCell score across neighboring cells. kNN-smoothing aims at compensating for the large degree of sparsity in scRNA-seq data. Finally, a universal threshold over kNN-smoothed signature scores is applied in binary decision trees generated from the user-provided gating model, to annotate cells as either “pure” or “impure”, with respect to the cell population of interest.

Installation
Install scGate from CRAN
r
install.packages("scGate")
For older versions of scGate, download a tagged version from GitHub:
r
library(remotes)
remotes::install_github("carmonalab/scGate", ref="v1.6.2")
Testing the package
Use scGate to purify a cell population of interest using manually defined marker genes
```r library(scGate)
Get a test scRNA-seq dataset (as a list of Seurat objects)
sample.data.seurat.list <- scGate::gettestingdata()
seurat_object <- sample.data.seurat.list$Satija
Manually define a simple scGate gating model to purify eg. Natural Killer (NK) cells, using a positive marker KLRD1 and negative marker CD3D
myscGatemodel <- gating_model(name = "NK", signature = c("KLRD1","CD3D-"))
scGate it!
seuratobject <- scGate(data = seuratobject, model = myscGatemodel)
Use Seurat to visualize "Pure" and "Impure" cells
DimPlot(seurat_object, group.by = "is.pure")
Use Seurat to subset pure cells
seuratobjectpurified <- subset(seurat_object, subset = is.pure == "Pure" )
```
Demos and tutorials
Check out this scGate demo for a reproducible analysis, construction of hierarchical gating models, tools for performance evaluation and other advanced features. More demos for running scGate on different single-cell modalities are available at scGate.demo repository.
Pre-defined Gating Models
A database of gating models for scGate is available on scGate_models and can be loaded using get_scGateDB()
```r
Get scGate database of pre-defined gating models
scGatemodelsDB <- get_scGateDB()
For example, filter abT cells using one of scGate pre-defined gating models
seuratobject <- scGate(seuratobject, model = scGatemodelsDB$human$generic$Tcell.alphabeta)
DimPlot(seuratobject)
``
The first time you rungetscGateDB()` the database will be downloaded from the repository. On successive calls it will load your local version of the DB.
You may manually edit the available models (eg in Excel) or create new models for your cell type of interest. You can then load your custom model into R using:
r
my_scGate_model <- load_scGate_model("path_to_my.model")
You can use the plot_tree function to visualize the hierarchical structure of one of the models (requires ggparty).
r
install.packages("ggparty")
scGate::plot_tree(scGate_models_DB$human$generic$Tcell.alphabeta)
scGate as a multi-class classifier
scGate can also be used a cell type classifier, to annotate multiple cell types in a dataset. To annotate a dataset with marker-based cell type definitions, simply provide a list of models to scGate, e.g.:
r
models.list <- scGate_models_DB$human$generic[c("Bcell","MoMacDC","CD8T","CD4T","Erythrocyte")]
obj <- scGate(obj, model = models.list)
scGate also provides collections of gating models that work nicely with each other to annotate cell types in specific tissues, e.g. for the tumor micro-environment (TME):
r
models.TME <- scGate_models_DB$human$TME_HiRes
obj <- scGate(obj, model=models.TME)
table(obj$scGate_multi)
See examples of scGate as a classifier at: scGate multi-class and scGate on integrated objects
Other single-cell modalities
scGate can be applied to modalities other than RNA-seq, such as ATAC-seq (scATAC-seq demo) and antibody-derived tags (ADT) (CITE-seq demo).
References
Massimo Andreatta, Ariel J Berenstein, Santiago J Carmona, scGate: marker-based purification of cell types from heterogeneous single-cell RNA-seq datasets, Bioinformatics, Volume 38, Issue 9, 1 May 2022, Pages 2642–2644, https://doi.org/10.1093/bioinformatics/btac141
Owner
- Name: Cancer Systems Immunology Lab
- Login: carmonalab
- Kind: organization
- Location: Lausanne, Switzerland
- Website: https://agora-cancer.ch/laboratory/carmona-lab
- Twitter: carmonation
- Repositories: 16
- Profile: https://github.com/carmonalab
At Ludwig Cancer Research Lausanne and Department of Oncology, University of Lausanne & Swiss Institute of Bioinformatics
GitHub Events
Total
- Create event: 1
- Release event: 1
- Issues event: 10
- Watch event: 20
- Issue comment event: 16
- Push event: 8
- Fork event: 1
Last Year
- Create event: 1
- Release event: 1
- Issues event: 10
- Watch event: 20
- Issue comment event: 16
- Push event: 8
- Fork event: 1
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 33
- Total pull requests: 5
- Average time to close issues: 4 months
- Average time to close pull requests: 1 day
- Total issue authors: 17
- Total pull request authors: 3
- Average comments per issue: 1.94
- Average comments per pull request: 0.2
- Merged pull requests: 5
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 7
- Pull requests: 0
- Average time to close issues: about 1 month
- Average time to close pull requests: N/A
- Issue authors: 5
- Pull request authors: 0
- Average comments per issue: 1.14
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- bbimber (6)
- sjcarmona (5)
- halterc (4)
- yeroslaviz (3)
- JGarnica22 (2)
- france-hub (2)
- dy-lin (1)
- saketkc (1)
- jiangzh-coder (1)
- kthorner (1)
- NoemieL (1)
- chrissikath (1)
- cwarden45 (1)
- antonioggsousa (1)
- KerryAM-R (1)
Pull Request Authors
- JGarnica22 (1)
- kew24 (1)
- bbimber (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 477 last-month
- Total docker downloads: 84
- Total dependent packages: 0
- Total dependent repositories: 2
- Total versions: 5
- Total maintainers: 1
cran.r-project.org: scGate
Marker-Based Cell Type Purification for Single-Cell Sequencing Data
- Homepage: https://github.com/carmonalab/scGate
- Documentation: http://cran.r-project.org/web/packages/scGate/scGate.pdf
- License: GPL-3
-
Latest release: 1.7.2
published 7 months ago
Rankings
Maintainers (1)
Dependencies
- R >= 4.1.0 depends
- Seurat >= 4.0.0 imports
- UCell >= 1.1.0 imports
- dplyr * imports
- ggplot2 * imports
- ggridges * imports
- patchwork * imports
- reshape2 * imports
- stats * imports
- utils * imports
- ggparty * suggests