Skip to content

ICR-RSE-Group/MuTrans-release

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ICR RSE Group have forked this to prepare some changes to the code specific to the ICR for plot outputs.

MuTrans (The MUltiscale method for TRANSient cells )

Dissecting Transition Cells from Single-cell Transcriptome through Multi-Scale Stochastic Dynamics

Peijie Zhou, Shuxiong Wang, Tiejun Li, Qing Nie

We proposed a framework based on the multiscale technique for stochastic dynamical systems to analyze single-cell transcriptome data and identify transition cells. MuTrans connects the languages of dynamical system with single-cell data analysis to describe cell-fate transitions, i.e. Attractor Basins with Meta-stable States, Saddle points with Transient States, and Most Probable Paths with Cell Lineages.

Get Prepared

In Matlab:

The code has been tested in Matlab R2019b and R2020a with optimization toolbox installed. To display gene expression matrix by Transcendental, one need the 'smooth' function (https://www.mathworks.com/help/curvefit/smoothing.html) from Curve Fitting toolbox of Matlab.

In Python:

  1. Install the matlab engine API for python, instructions here
  2. Install the dependency package PyEMMA >=2.5.6, Scanpy, Numpy, Pandas and Seaborn.
  3. cd to the ./Example/ folder and analysis in Jupyter notebook

Basic Usage

In Matlab:

Output = DynamicalAnalysis(data,par)

%% Run the multi-scale analysis, returns the attractor basins, coarse-grained transition probabilities and membership assignment

%% data: the pre-processed single-cell gene expression, with N_cells x N_genes

%% par: the adjustable parameters
Lineage = InferLineage(Output,par)

%% Infer the cell lineage based on multi-scale analysis results

%% Output: the output object from DynamicalAnalysis function

%% par: the adjustable parameters

Land = ConstructLandscape(Output,par)

%% Construct and visualize the dynamical manifold

%% Output: the output object from DynamicalAnalysis function

%% par: the adjustable parameters

Genes = GeneAnalysis(i,j,Output,par)

%% Transition cell and gene analysis from state transition i to j.

%% i and j: the starting and targeting states for analysis

%% Output: the output object from DynamicalAnalysis function

%% par: the adjustable parameters

In Python:

import pyMuTrans as pm
par = {"K_cluster": 5.0} # number of attractors, can plot EPI to give the rough estimate of clusters or refer to other clustering results such as Louvain/Leiden results or from biological prior. For other parameters, see the source file of pyMuTrans.py  
par["reduce_large_scale"] = True # optional, to use DECLARE module speeding-up the calculation
par["reduce_num_meta_cell"] = 1500 # optional, to set the number of microsopic meta-stable states in DECLARE
adata = pm.dynamical_analysis(adata,par) # MuTrans Analysis on Anndata obejct
pm.infer_lineage(adata,si=2,sf=0,method = "MPPT",size_point =40, size_text = 10,alpha_point = 0.5) # plot the transition trajectory on dynamical manifold

Example Notebooks

System Data Source Notebook File
Saddle-Node Bifurcation Simulation Data in this study example_saddle_node.mlx
Potential-well Transitions Simulation Data in this study Double-well Potential: example_double_well.mlx;
Triple-well Potential: example_triple_well.mlx
Epithelial-Mesenchymal Transition Pastushenko et al. example-emt-raw.ipynb
iPSC Reprogramming Bargaje et al. Matlab:example_ipsc.mlx;
Python:example_ipsc.ipynb
Myelopoiesis Olsson et al. Matlab:example_olsson.mlx;
Python:example-olsson.ipynb
Lymphoid Lineage Blood Differentiation Herman et al. example_mpp.mlx
Human Bone Marrow Setty et al. example_bone_marrow-new.ipynb
Blood Development in Mouse Gastrulation Pijuan-Sala et al. example_haem_development_15K.ipynb

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Jupyter Notebook 97.6%
  • MATLAB 2.1%
  • Other 0.3%