Skip to main content

scanpy compatible python suite for fast tree inference and advanced pseudotime downstream analysis

Project description

PyPI Documentation Status Build and Test codecov GitHub license Code style: black

Description

This package provides a scalable Python suite for fast tree inference and advanced pseudotime downstream analysis, with a focus on fate biasing. This package is compatible with anndata object format used in scanpy or scvelo pipelines. A complete documentation of this package is available here.

Tree inference algorithms

The user have the choice between two algorithm for tree inference:

ElPiGraph

For scFates, the python implementation of the ElPiGraph algorithm is used, which include GPU accelerated principal tree inference. A self-contained description of the algorithm is available here or in the related paper

A R implementation of this algorithm is also available, coded by Luca Albergante

A native MATLAB implementation of the algorithm (coded by Andrei Zinovyev and Evgeny Mirkes) is also available

Simple PPT

A simple PPT inspired approach, translated from the crestree R package, code has been also adapted to run on GPU for accelerated tree inference.

Citations

Code for PPT inference and most of downstream pseudotime analysis was initially written in a R package by Ruslan Soldatov for the following paper:

Soldatov, R., Kaucka, M., Kastriti, M. E., Petersen, J., Chontorotzea, T., Englmaier, L., … Adameyko, I. (2019).
Spatiotemporal structure of cell fate decisions in murine neural crest.
Science, 364(6444).

if you are using ElPiGraph, please cite:

Albergante, L., Mirkes, E. M., Chen, H., Martin, A., Faure, L., Barillot, E., … Zinovyev, A. (2020).
Robust And Scalable Learning Of Complex Dataset Topologies Via Elpigraph.
Entropy, 22(3), 296.

Code for preprocessing has been translated from R package pagoda2, if you use any of these functions (scf.pp.batch_correct & scf.pp.find_overdispersed), please cite:

Nikolas Barkas, Viktor Petukhov, Peter Kharchenko and Evan
Biederstedt (2021). pagoda2: Single Cell Analysis and Differential
Expression. R package version 1.0.2.

Palantir python tool provides a great dimensionality reduction method, which usually lead to consitent trees with scFates, if use scf.pp.diffusion, please cite:

Manu Setty and Vaidotas Kiseliovas and Jacob Levine and Adam Gayoso and Linas Mazutis and Dana Pe'er (2019)
Characterization of cell fate probabilities in single-cell data with Palantir.
Nature Biotechnology

Installation

scFates is available on pypi, you can install it using:

pip install -U scFates

or the latest development version can be installed from GitHub:

pip install git+https://github.com/LouisFaure/scFates

Python dependencies

scFates gives the choice of between SimplePPT and ElPiGraph for learning a principal graph from the data. Elpigraph needs to be installed from its github repository with the following command:

pip install git+https://github.com/j-bac/elpigraph-python.git

R dependencies

scFates rely on the R package mgcv to perform testing and fitting of the features on the peudotime tree. Package is installed in an R session with the following command:

install.packages('mgcv')

GPU dependencies (optional)

If you have a nvidia GPU, scFates can leverage CUDA computations for speedups in some functions, for that you will need Rapids installed. This can be easily done via a dedicated conda environment:

conda create -n scFates-gpu -c rapidsai -c nvidia -c conda-forge -c defaults \
    rapids=0.19 python=3.8 cudatoolkit=11.0 -y
conda activate scFates-gpu
pip install git+https://github.com/j-bac/elpigraph-python.git
pip install scFates --ignore-installed

Docker container

scFates can be run on a Docker container based on Rapids 0.18 container, which provide a gpu enabled environment with Jupyter Lab. Use the following command:

docker run --rm -it --gpus all -p 8888:8888 -p 8787:8787 -p 8786:8786 \
    louisfaure/scfates:version-{version.number}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scFates-0.2.3.tar.gz (756.8 kB view hashes)

Uploaded Source

Built Distribution

scFates-0.2.3-py3-none-any.whl (391.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page