A unified workflow for data-driven precision cell fate engineering via highly multiplexed gene control
Using pip:
Ensure you have Python and pip installed on your system. Then run the following command:
pip install -r model/requirements.txt
Using conda:
Ensure you have Anaconda or Miniconda installed on your system. Create a new conda environment (optional but recommended):
conda create --name cell_reprogram_env
conda activate cell_reprogram_env
Install the dependencies:
conda install --file model/requirements.txt
Worfklow for processing new dataset and running the model
path = '../data/Friedman.h5ad'
raw_adata = sc.read_h5ad('../data/Friedman.h5ad')
workflow = precice(adata=raw_adata,
path = path,
cell_filter=True)
workflow.set_up_scvi(batch_key='day')
## Visualize effects
workflow.scvi_plot_setup()
sc.pl.umap(workflow.adata, color='day')
### Identify source and target cells
source_name = 'stem'
target_name = 'meso'
workflow.get_DE(source_name=source_name, target_name=target_name)
workflow.get_network(cell_type='embryonic stem cell')
## Set up PySCENIC for given dataset
workflow.set_up_pyscenic(species)
## Run PySCENIC (Takes several hours)
workflow.run_pyscenic()
## Post processing of learnt transcriptional network
workflow.learn_weights()
transition = source_name +'_to_' + target_name
python_path = '/user/bin/python'
workflow.run_precice(species='human', python_path=python_path,
network_path=workflow.network_path,
DE_path=workflow.DE_filenames[transition])
Step 6. Plot results: ranked list of perturbations and associated precision score with each perturbation
from plot import make_precision_plot
result_file = %% insert path to results generated by precice
make_precision_plot(result_file, source=source_name, target=target_name)