scprep provides an all-in-one framework for loading, preprocessing, and plotting matrices in Python, with a focus on single-cell genomics.
The philosophy of scprep:
Data shouldn’t be hidden in a complex and bespoke class object. scprep works with numpy arrays, pandas data frames, and scipy sparse matrices, all of which are popular data formats in Python and accepted as input to most common algorithms.
Your analysis pipeline shouldn’t have to change based on data format. Changing from a numpy array to a pandas data frame introduces endless technical differences (e.g. in indexing matrices). scprep provides data-agnostic methods that work the same way on all formats.
Simple analysis should mean simple code. scprep takes care of annoying edge cases and sets nice defaults so you don’t have to.
Using a framework shouldn’t be limiting. Because nothing is hidden from you, you have access to the power of numpy, scipy, pandas and matplotlib just as you would if you used them directly.
Installation
preprocessing is available on pip. Install by running the following in a terminal:
pip install --user scprep
Alternatively, scprep can be installed using Conda (most easily obtained via the Miniconda Python distribution):
conda install -c bioconda scprep
Quick Start
You can use scprep with your single cell data as follows:
import scprep
# Load data
data_path = "~/mydata/my_10X_data"
data = scprep.io.load_10X(data_path)
# Remove empty columns and rows
data = scprep.filter.remove_empty_cells(data)
data = scprep.filter.remove_empty_genes(data)
# Filter by library size to remove background
scprep.plot.plot_library_size(data, cutoff=500)
data = scprep.filter.filter_library_size(data, cutoff=500)
# Filter by mitochondrial expression to remove dead cells
mt_genes = scprep.select.get_gene_set(data, starts_with="MT")
scprep.plot.plot_gene_set_expression(data, genes=mt_genes, percentile=90)
data = scprep.filter.filter_gene_set_expression(data, genes=mt_genes,
percentile=90)
# Library size normalize
data = scprep.normalize.library_size_normalize(data)
# Square root transform
data = scprep.transform.sqrt(data)
Examples
Help
If you have any questions or require assistance using scprep, please read the documentation at https://scprep.readthedocs.io/ or contact us at https://krishnaswamylab.org/get-help
Metadata
Release files for scprep 1.2.3
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 |
|---|---|---|---|---|
| scprep-1.2.3.tar.gz | 108.0 kB | Without provenance | Details for scprep-1.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| scprep-1.2.3-py3-none-any.whl | Python 3 | none | any | Details for scprep-1.2.3-py3-none-any.whl |
Total release size: 202.1 kB
Release files / scprep-1.2.3.tar.gz
| Download URL | scprep-1.2.3.tar.gz |
|---|---|
| Size | 108.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cc4ba4cedbba256935298f2ba6a973b4e74ea8cb9ad2632b693b6d4e6ab77c3f
|
|
BLAKE2b-256 checksum How to use checksums |
ba719295d94b62bad558c8a7f48e8dc2a3621424cdacf28359ca4693af1032da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / scprep-1.2.3-py3-none-any.whl
| Download URL | scprep-1.2.3-py3-none-any.whl |
|---|---|
| Size | 94.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
31c75956baee3fc7a079957ce4e01821b36012163bd9d34e48afc74b42b5d875
|
|
BLAKE2b-256 checksum How to use checksums |
2ad272a06c97668b07ef703ffdc392cbd5ce004733d14978f6ae2ae71a09df41
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Security for scprep 1.2.3
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.