Palantir is an algorithm to align cells along differentiation trajectories. Palantir models differentiation as a stochastic process where stem cells differentiate to terminally differentiated cells by a series of steps through a low dimensional phenotypic manifold. Palantir effectively captures the continuity in cell states and the stochasticity in cell fate determination. Palantir has been designed to work with multidimensional single cell data from diverse technologies such as Mass cytometry and single cell RNA-seq.
Palantir has been implemented in Python3 and can be installed using:
pip install palantir
You can also install Palantir via conda, mamba, or micromamba from the bioconda channel:
conda install -c conda-forge -c bioconda palantir
mamba install -c conda-forge -c bioconda palantir
micromamba install -c conda-forge -c bioconda palantir
These methods ensure that all dependencies are resolved and installed efficiently.
A tutorial on Palantir usage and results visualization for single cell RNA-seq data can be found in this notebook: https://github.com/dpeerlab/Palantir/blob/master/notebooks/Palantir_sample_notebook.ipynb
More tutorials and a documentation of all the Palantir components can be found here: https://palantir.readthedocs.io
scanpy anndata
objects are available for download for the three replicates generated in the manuscript:
This notebook details how to use the data in Python
and R
:
https://github.com/dpeerlab/Palantir/blob/master/notebooks/manuscript_data.ipynb
Notebooks detailing the generation of results comparing Palantir to trajectory detection algorithms are available here
Palantir manuscript is available from Nature Biotechnology. If you use Palantir for your work, please cite our paper.
@article{Palantir_2019,
title = {Characterization of cell fate probabilities in single-cell data with Palantir},
author = {Manu Setty and Vaidotas Kiseliovas and Jacob Levine and Adam Gayoso and Linas Mazutis and Dana Pe'er},
journal = {Nature Biotechnology},
year = {2019},
month = {march},
url = {https://doi.org/10.1038/s41587-019-0068-4},
doi = {10.1038/s41587-019-0068-4}
}
select_branch_cells
for very small datasetsdo not plot unclustered trends (NaN cluster) in plot_gene_trend_clusters
progress=True
in palantir.utils.run_local_variability
compatibility with scanpy>=1.10.0
python>=3.8
plot_trajectory
function to show trajectory on the umapscale pseudotime to unit intervall in anndata
palantir.plot.plot_stats
to plot arbitray cell-wise statistics as x-/y-positions.palantir.presults.compute_gene_trends
run_diffusion_maps
to split out compute_kernel
and diffusion_maps_from_kernel
tables
, Cython
, cmake
, and tzlocal
.fixes in run_pca
(return correct projections and do not use too many components)
palantir.utils.early_cell
To automate fining an early cell based on cell type and diffusion components.palantir.utils.find_terminal_states
To automate finding terminal cell states based on cell type and diffusion components.palantir.presults.select_branch_cells
To find cells associated to each branch based on fate probability.palantir.plot.plot_branch_selection
To inspect the cell to branch association.palantir.utils.run_local_variability
To compute local gene expression variability.palantir.utils.run_density
A wrapper for mellon.DensityEstimator.palantir.utils.run_density_evaluation
Evaluate computed density on a different dataset.palantir.utils.run_low_density_variability
. To aggregate local gene expression variability in low density.palantir.plot.plot_branch
. To plot branch-selected cells over pseudotime in arbitrary y-postion and coloring.palantir.plot.plot_trend
. To plot the gene trend ontop of palantir.plot.plot_branch
.Expanded documentation within docstrings, providing additional clarity for users and developers.
Enable annotation in palantir.plot.highight_cells_on_umap
.
scanpy.tl.leiden
for gene trend clustering.run_tsne
, determine_cell_clusters
, and plot_cell_clusters
functions. Use corresponding implementations from Scanpy, widely used single-cell analysis library and direct dependecy of Palantir.palantir.plot.highight_cells_on_tsne
to palantir.plot.highight_cells_on_umap
Depend on anndata>=0.8.0
to avoid issues writing dataframes in ad.obsm
.