Supervised inference of gene regulatory networks from single-cell RNA-sequencing data
git clone https://github.com/Murali-group/supervised-grns.git
We recommend using an Anaconda environment to run the pipeline. The below steps can be followed on your Ubuntu machine to get the pipeline setup and running.
- Install Anaconda from the official website here
- After you have Anaconda installed on your machine, we will create a conda environment specific for this project. This project works on
Python3
conda create -n "SGRN" python=3.7.10 ipython
- This will create an environment called
SGRN
withPython 3.7.10
- Activate the environment with the command
conda activate SGRN
- We will now install the required packages and dependencies in the
SGRN
environment.
- This will create an environment called
-
supervised-grns pipeline mainly uses
PyTorch
framework for its computation, amongst other libraries. We found that installingPyTorch
can be tricky so we split this step into two -- Install
PyTorch
and related modules - Install rest of the packages through
pip install requirements.txt
- Install
-
In this step, we will install
PyTorch
library along with the necessary dependencies.- Install PyTorch in your environment with the following command -
conda install -c pytorch pytorch=1.8.0
- Check if PyTorch is installed and check the version. You should get an output like this -
python -c "import torch; print(torch.__version__)" 1.8.0
- Similarly, install
torchvision
and check if is correctly installed -conda install -c pytorch torchvision python -c "import torchvision; print(torchvision.__version__)" 0.9.0
- Finally, the
PyTorch geometric
library can be installed by following the steps here listed under Installation via Binaries
- Install PyTorch in your environment with the following command -
-
For the evaluation, we additionally need R packages. For this install R within the SGRN conda environment using:
conda install r=3.5.0
R -e "install.packages('https://cran.r-project.org/src/contrib/PRROC_1.3.1.tar.gz', type = 'source')"
-
We now install the rest of the libraries using the
requirements.txt
file.pip install -r requirements.txt
That's it! We can now run the pipeline and check if everything is working fine.
Navigate to your folder where the code is downloaded. Run the following command to run the pipeline.
python main.py --config=config/config.yaml
The output is stored under <output_dir>/<output_prefix>/ (the parameter values are obtained from output_settings in the config.yaml). The output folder contains rankedEdges.csv files with the edge list for each algorithm for each random seed and a statsperFold.csv and statsAggregated.csv files containing the evaluation results stored in a tab-separated file.