Installing tensorqtl module
Installing tensorqtl requires pytorch which is based on gpus but there is also a cpu based version.
CRI has set up pytorch for cpus as in a conda environment and that is what I am going to use to set up tensorqtl.
I will install the tensorqtl in im-lab share space for lab use.
Steps for installation
Create a directory for the environment
mkdir -p /gpfs/data/im-lab/nas40t2/bin/envs cd /gpfs/data/im-lab/nas40t2/bin/envs
Copy the pytorch environment into this new directory and name it tensorqtl
cp -r /apps/software/gcc-6.2.0/miniconda3/4.7.10/envs/pytorch-1.4.0-cpu_py37 tensorqtl
Now we have the pytorch setup environment next we are going to set up tensorqtl
Checking if requirements are available
Activate the conda environment
conda activate /gpfs/data/im-lab/nas40t2/bin/envs/tensorqtl
In this environment when you test the pip command its not executable because the environment has python2. We need to upgrade the environment to use python3.
Test the availability of pip and python3 using the following commands
python3 --version pip3 --version pip --version
If you get error then you definitely need to set up these tools
Set up python3
Install python3 which works with the set up pip
conda install python==3.8.0
Install tensorqtl
Tensorqtl is available from pip
pip install tensorqtl
Once installation is successful install the dependecies
Install the rpy2 dependency
conda install rpy2
Test tensorqtl
python3 -m tensorqtl --help
Clean up
Conda caches all these packages which consume a lot of disk space. The need to be removed;
conda clean --all
NB: This environment is available for lab use. To activate the the environment for use just activate it
conda activate /gpfs/data/im-lab/nas40t2/bin/envs/tensorqtl
Happy QTL mapping!!!