DoubletDetection
DoubletDetection is a Python3 package to detect doublets (technical errors) in single-cell RNA-seq count matrices.
Installing DoubletDetection
Install from PyPI
pip install doubletdetection
Install from source
git clone https://github.com/JonathanShor/DoubletDetection.git
cd DoubletDetection
pip3 install .
If you are using pipenv as your virtual environment, it may struggle installing from the setup.py due to our custom Phenograph requirement.
If so, try the following in the cloned repo:
pipenv run pip3 install .
Running DoubletDetection
To run basic doublet classification:
import doubletdetection
clf = doubletdetection.BoostClassifier()
# raw_counts is a cells by genes count matrix
labels = clf.fit(raw_counts).predict()
# higher means more likely to be doublet
scores = clf.doublet_score()
raw_countsis a scRNA-seq count matrix (cells by genes), and is array-likelabelsis a 1-dimensional numpy ndarray with the value 1 representing a detected doublet, 0 a singlet, andnp.nanan ambiguous cell.scoresis a 1-dimensional numpy ndarray representing a score for how likely a cell is to be a doublet. The score is used to create the labels.
The classifier works best when
- There are several cell types present in the data
- It is applied individually to each run in an aggregated count matrix
In v2.5 we have added a new experimental clustering method (scanpy's Louvain clustering) that is much faster than phenograph. We are still validating results from this new clustering. Please see the notebook below for an example of using this new feature.
Tutorial
See our tutorial for an example on 10k PBMCs from 10x Genomics.
Obtaining data
Data can be downloaded from the 10x website.
Credits and citations
Gayoso, Adam, Shor, Jonathan, Carr, Ambrose J., Sharma, Roshan, Pe'er, Dana (2020, December 18). DoubletDetection (Version v3.0). Zenodo. http://doi.org/10.5281/zenodo.2678041
We also thank the participants of the 1st Human Cell Atlas Jamboree, Chun J. Ye for providing data useful in developing this method, and Itsik Pe'er for providing guidance in early development as part of the Computational genomics class at Columbia University.
This project is licensed under the terms of the MIT license.
Metadata
Release files for doubletdetection 4.3.0.post1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| doubletdetection-4.3.0.post1.tar.gz | 641.8 kB | Without provenance | Details for doubletdetection-4.3.0.post1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| doubletdetection-4.3.0.post1-py3-none-any.whl | Python 3 | none | any | Details for doubletdetection-4.3.0.post1-py3-none-any.whl |
Total release size: 653.1 kB
Release files / doubletdetection-4.3.0.post1.tar.gz
| Download URL | doubletdetection-4.3.0.post1.tar.gz |
|---|---|
| Size | 641.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c03a1138c15d4b0f918dbddd0887e8c9464af8e68f42c63f05b82790e2038a6b
|
|
BLAKE2b-256 checksum How to use checksums |
422e966702fa9b657eb3bef44ce37d75ac84a24b04356e7b9160f5aa7f131b85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.23.0
|
Release files / doubletdetection-4.3.0.post1-py3-none-any.whl
| Download URL | doubletdetection-4.3.0.post1-py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dc02698e96300c7cc5713de8a3ad834c206ed61e50e5acfc52fb43eb3ce5e5bc
|
|
BLAKE2b-256 checksum How to use checksums |
12102d877145924359ba1501793e2aabb3cda4bb90b10c265b6a4997acbfd71b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.23.0
|
Security for doubletdetection 4.3.0.post1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.