sanderlab / scPerturb

scPerturb: A resource and a python/R tool for single-cell perturbation data
http://www.sanderlab.org/scPerturb/
Other
104 stars 6 forks source link
cite-seq database perturbation python r scatac-seq science scrna-seq single-cell statistics

Website GitHub issues GitHub last commit

scPerturb: A resource and a python tool for single-cell perturbation data

For the publication see: Peidli, S., Green, T.D., et al. Nature Methods (2024).

Where to find the data

The datasets are available to download on scperturb.org (where you can also find an interactive table of all included datasets). The latest versions are available in full on Zenodo, depending on the modality you are interested in:

scperturb for python (integrates with scanpy)

PyPI - Downloads

A python package to compute E-distances in single-cell perturbation data and perform E-tests.

Install

Just install via pip:

pip install scperturb

Usage example

Check out this notebook for a tutorial. Basic usage is:

# E-distances
estats = edist(adata, obs_key='perturbation')
# E-distances to a specific group (e.g. 'control')
estats_control = estats.loc['control']
# E-test for difference to control
df = etest(adata, obs_key='perturbation', obsm_key='X_pca', dist='sqeuclidean', control='control', alpha=0.05, runs=100)

scperturbR for R (integrates with Seurat)

R-CMD-check

We wrote an R version of scperturb that works with Seurat objects. You can find it as scperturbR on CRAN. A basic usage vignette is WIP. Install using:

install.packages('scperturbR')

Reproducibility

Instructions to run the code to reproduce the figures and tables in the paper and supplement: