API¶
Import scFates as:
import scFates as scf
Some convenient preprocessing functions translated from pagoda2 have been included:
Pre-processing¶
|
Filter cells using on gene/molecule relationship. |
|
batch correction of the count matrix. |
|
Find overdispersed gene, using pagoda2 strategy. |
|
Wrapper to generate diffusion maps using Palantir. |
Tree inference¶
|
Generate a principal tree. |
|
Generate a principal curve. |
|
Generate a principal circle. |
|
Converts CellRank [Lange21] fate probabilities into a principal tree that can be analysed by scFates. |
|
Explore varisou sigma parameters for best tree fitting. |
Tree operations¶
|
Remove spurious branches from the tree. |
|
Subset the fitted tree. |
|
Attach a tree to another! |
|
While keeping nodes defining forks and tips (milestones), reduce the number of nodes composing the segments. |
|
Convert an hard assignment matrix to a soft one, allowing for probabilistic mapping. |
Pseudotime analysis¶
|
Define the root of the trajectory. |
|
Define 2 roots of the tree. |
|
Compute pseudotime. |
|
Generate a single-cell dendrogram embedding. |
|
Determine a set of genes significantly associated with the trajectory. |
|
Separately test for associated features for each covariates on the same trajectory path. |
|
Determine a set of genes significantly associated with the trajectory. |
|
Model feature expression levels as a function of tree positions. |
|
Cluster features. |
|
Test for branch differential gene expression between covariates on the same trajectory path. |
|
Identifies genes that specifically characterize a given transition but not the progenitors neither the progenies. |
|
Unroll circle to get full spectrum of pseudotime values along it. |
Bifurcation analysis¶
Branch specific feature extraction and classification
|
Test for branch differential gene expression and differential upregulation from progenitor to terminal state. |
|
Assign genes differentially expressed between two post-bifurcation branches. |
|
Identify pseudotime of activation of branch-specififc features. |
|
A more robust version of tl.activation. |
Correlation analysis
|
Estimates the pseudotime onset of a feature within its fate-specific module. |
|
Assign cells in a probabilistic manner to non-intersecting windows along pseudotime. |
|
Obtain gene module correlations in the non-intersecting windows along pseudotime. |
|
Estimates pseudotime trends of local intra- and inter-module correlations of fates-specific modules. |
|
Wrappers that call tl.synchro_path on the pairwise combination of all selected branches. |
Plot¶
Trajectory
|
Project principal graph onto embedding. |
|
Project trajectory onto embedding. |
|
Project trajectory onto 3d embedding. |
|
Plot the single-cell dendrogram embedding. |
|
Display the milestone graph in PAGA style. |
Pseudotime features
|
Plot a set of fitted features over pseudotime. |
|
Plot a single feature fit over pseudotime. |
|
Plot a set of fitted features over pseudotime. |
|
Plot a set of features as per-segment matrix plots of binned pseudotimes. |
|
Plot the results generated by tl.linearity_deviation. |
|
Plot a dot plot of proportion of cells from a given category over binned sections of pseudotime. |
Bifurcation & correlation analysis
|
Plot the mean expression of the early and late modules. |
|
Plot results generated from tl.test_fork. |
|
Plot results generated from tl.slide_cors. |
|
Plot results generated from tl.synchro_path. |
|
Plot results generated from tl.module_inclusion. |
Getting analysed data¶
|
Extract statistics from the fork analysis. |
|
Extract mean expression of identified early and late modules. |
|
Extract statistics from the sliding window correlation analysis. |