This repository contains code, data files, and instructions to recreate the results presented in SwitchTFI: identifying transcription factors driving cell differentiation (doi).
For a standalone implementation of SwitchTFI we refer to https://github.com/bionetslab/SwitchTFI.
Instructions on how to install and set up the project locally.
# Clone the repository
git clone git@github.com:bionetslab/SwitchTFI-validation.git
# Navigate to the project directory
cd SwitchTFI-validation
# Create and activate the Conda environment from the .yml file
conda env create -f switchtfi_val.yml
conda activate switchtfi_valAll main scripts are documented with inline comments explaining the individual steps. Functions used in the workflow are documented with docstring comments providing further information. To reproduce the results follow the workflow:
# Create conda environment for preprocessing
conda env create -f preprocessing/prepr.yml
conda activate preprocessing
# Run preprocessing scripts
python 00_data_preprocessing.pyThe auxiliary files required by Scenic can be downloaded from https://resources.aertslab.org/cistarget/ (10.10.24).
They must be stored in the correct subdirectory of ./data/scenic_aux_data. For information on the auxiliary data see ./data/scenic_aux_data/meta_data.txt
# Create conda environment for GRN Inference with PyScenic
conda env create -f grn_inf/psc.yml
conda activate psc
# Run GRN inference scripts, this may take a while (>= 24h with 32 cores)
python 01_grn_inference.py# Activate main environment
conda activate switchtfi_val
# Run SwitchTFI analyses with the preprocessed scRNA-seq data and the inferred GRN as an input
python 02_switchtfi_model_fitting.py# Activate main environment
conda activate switchtfi_val
# Run scripts with necessary computations for the validation of SwitchTFI
python 03_validation.pyTo reproduce the results for the competitor methods, again there are separate conda environments provided. Set the flags in the script such that only the respective parts are run. For DrivAER this is a little more complicated, detailed instructions can be found in the inline comments
# Create conda environment for inferring driver TFs with spliceJAC
conda env create -f validation/spjc.yml
conda activate spjc
# Run script
python 03_validation.py# Create conda environment for inferring driver TFs with DrivAER
conda env create -f validation/drivaer.yml
conda activate drivaer
pip install --no-deps git+https://github.com/lkmklsmn/DrivAER.git
# Run script
python 03_validation.py# Activate main environment
conda activate switchtfi_val
# Run scripts to produce the plots
python 04_plotting.pyNote:
- SwitchTFI provides the preprocessed data via the functions
switchtfi.data.preendocrine_alpha(),switchtfi.data.preendocrine_beta(), andswitchtfi.data.erythrocytes(). - The GRNs used to produce the results are provided in
./results/01_grn_inf. - The results of the SwitchTFI analyses are provided in
./results/02_switchtfi. - Parts of the results of the validation procedures are already provided in
./results/02_validation. - The plots are provided in
switchtfi_val/results/03_plots.
Scripts addressing points raised during the manuscript revision are provided in 05_revision.py.
Additional scripts for scalability analysis can be found in scalability.py.
A separate environment switchtfi_de.yml was used to run differential expression analysis with the ZINB-WaVE extension of edgeR.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Paul Martini - paul.martini@fau.de | ORCID | Biomedical Network Science Lab
Project Link: https://github.com/bionetslab/SwitchTFI-validation