Python implementation of the SCENIC pipeline for transcription factor inference from single-cell transcriptomics experiments.
Project description
pySCENIC is a lightning-fast python implementation of the SCENIC pipeline (Single-Cell rEgulatory Network Inference and Clustering) which enables biologists to infer transcription factors, gene regulatory networks and cell types from single-cell RNA-seq data.
The pioneering work was done in R and results were published in Nature Methods [1]. A new and comprehensive description of this Python implementation of the SCENIC pipeline is available in Nature Protocols [4].
pySCENIC can be run on a single desktop machine but easily scales to multi-core clusters to analyze thousands of cells in no time. The latter is achieved via the dask framework for distributed computing [2].
Full documentation for pySCENIC is available on Read the Docs
pySCENIC is part of the SCENIC Suite of tools! See the main SCENIC website for additional information and a full list of tools available.
News and releases
0.12.0 | 2022-08-16
Only databases in Feather v2 format are supported now (ctxcore >= 0.2), which allow uses recent versions of pyarrow (>=8.0.0) instead of very old ones (<0.17). Databases in the new format can be downloaded from https://resources.aertslab.org/cistarget/databases/ and end with *.genes_vs_motifs.rankings.feather or *.genes_vs_tracks.rankings.feather.
Support clustered motif databases.
Use custom multiprocessing instead of dask, by default.
Docker image uses python 3.10 and contains only needed pySCENIC dependencies for CLI usage.
Remove unneeded scripts and notebooks for unused/deprecated database formats.
0.11.2 | 2021-05-07
Split some core cisTarget functions out into a separate repository, ctxcore. This is now a required package for pySCENIC.
0.11.1 | 2021-02-11
Fix bug in motif url construction (#275)
Fix for export2loom with sparse dataframe (#278)
Fix sklearn t-SNE import (#285)
Updates to Docker image (expose port 8787 for Dask dashboard)
0.11.0 | 2021-02-10
Major features:
Updated arboreto release (GRN inference step) includes:
Support for sparse matrices (using the --sparse flag in pyscenic grn, or passing a sparse matrix to grnboost2/genie3).
Fixes to avoid dask metadata mismatch error
Updated cisTarget:
Fix for metadata mismatch in ctx prune2df step
Support for databases Apache Parquet format
Faster loading from feather databases
Bugfix: loading genes from a database (previously missing the last gene name in the database)
Support for Anndata input and output
Package updates:
Upgrade to newer pandas version
Upgrade to newer numba version
Upgrade to newer versions of dask, distributed
Input checks and more descriptive error messages.
Check that regulons loaded are not empty.
Bugfixes:
In the regulons output from the cisTarget step, the gene weights were incorrectly assigned to their respective target genes (PR #254).
Motif url construction fixed when running ctx without pruning
Compression of intermediate files in the CLI steps
Handle loom files with non-standard gene/cell attribute names
Reformat the genesig gmt input/output
Fix AUCell output to loom with non-standard loom attributes
0.10.4 | 2020-11-24
Included new CLI option to add correlation information to the GRN adjacencies file. This can be called with pyscenic add_cor.
See also the extended Release Notes.
Overview
The pipeline has three steps:
First transcription factors (TFs) and their target genes, together defining a regulon, are derived using gene inference methods which solely rely on correlations between expression of genes across cells. The arboreto package is used for this step.
These regulons are refined by pruning targets that do not have an enrichment for a corresponding motif of the TF effectively separating direct from indirect targets based on the presence of cis-regulatory footprints.
Finally, the original cells are differentiated and clustered on the activity of these discovered regulons.
The most impactful speed improvement is introduced by the arboreto package in step 1. This package provides an alternative to GENIE3 [3] called GRNBoost2. This package can be controlled from within pySCENIC.
All the functionality of the original R implementation is available and in addition:
You can leverage multi-core and multi-node clusters using dask and its distributed scheduler.
We implemented a version of the recovery of input genes that takes into account weights associated with these genes.
Regulons, i.e. the regulatory network that connects a TF with its target genes, with targets that are repressed are now also derived and used for cell enrichment analysis.
Additional resources
For more information, please visit LCB, the main SCENIC website, or SCENIC (R version). There is a tutorial to create new cisTarget databases. The CLI to pySCENIC has also been streamlined into a pipeline that can be run with a single command, using the Nextflow workflow manager. There are two Nextflow implementations available:
SCENICprotocol: A Nextflow DSL1 implementation of pySCENIC alongside a basic “best practices” expression analysis. Includes details on pySCENIC installation, usage, and downstream analysis, along with detailed tutorials.
VSNPipelines: A Nextflow DSL2 implementation of pySCENIC with a comprehensive and customizable pipeline for expression analysis. Includes additional pySCENIC features (multi-runs, integrated motif- and track-based regulon pruning, loom file generation).
Acknowledgments
We are grateful to all providers of TF-annotated position weight matrices, in particular Martha Bulyk (UNIPROBE), Wyeth Wasserman and Albin Sandelin (JASPAR), BioBase (TRANSFAC), Scot Wolfe and Michael Brodsky (FlyFactorSurvey) and Timothy Hughes (cisBP).
References
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyscenic-0.12.0.tar.gz
.
File metadata
- Download URL: pyscenic-0.12.0.tar.gz
- Upload date:
- Size: 7.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b931f5d6daa57c1df4ed28910dfcfbb4f69c11946b90f981c86447eb7b0c5113 |
|
MD5 | 5e42466a50735f03c340d0583f4a4b26 |
|
BLAKE2b-256 | ec620df0eeefcc6637bd58e234ff3a2561837ebd8a96cfded9c5c4ad3162aae6 |
File details
Details for the file pyscenic-0.12.0-py3-none-any.whl
.
File metadata
- Download URL: pyscenic-0.12.0-py3-none-any.whl
- Upload date:
- Size: 7.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad1d817ec971ea4aa8bb654abd8a4ae9d668dd2c3f8c5f4a52d790bd8e356db7 |
|
MD5 | 43ade1f5d3a9990ced90d3033b11df6e |
|
BLAKE2b-256 | efbbca855757002782aa979d96133a8e00b27852bc00a18b9f270f7e183ee292 |