Installing Easymap

The install process provided by Easymap required multiple system packages to be installed as well as sudo permissions to install programs globally. Because of our node arrangement, this isn’t possible to do on our cluster.

Instead, below is a modified installation script tailored to our cluster to attempt to install easymap. The following can be turned into a bash script or ran line-by-line. Regardless, you’ll want to run it on a compute node as it is too computationally heavy for a head node. (eg. srun -p epyc -c 8 --mem 16GB --pty bash -l)

#!/bin/bash -l

git clone https://github.com/samuellup/easymap.v2.git
cd easymap.v2/
mkdir user_data
mkdir user_projects

# Installing requirements
cd ./htslib
make clean
make -j $(nproc)

cd ../bcftools-1.3.1
make clean
make -j $(nproc)

cd ../bowtie2
make clean
make -j $(nproc)

cd ../samtools1
make clean
make -j $(nproc)

cd ../hisat2
make clean
make -j $(nproc)

# fastp is skipped, use module

cd .. # Should be in "easymap.v2" folder
mkdir src
cd src

# Installing Python Requirement
wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz
tar -zxvf Python-2.7.18.tgz
cd Python-2.7.18
mkdir .localpython
./configure --prefix=$PWD/.localpython
make -j $(nproc)
make install
cd .. # Should be in "src" dir

# Installing VirtualEnv requirement
wget https://pypi.python.org/packages/d4/0c/9840c08189e030873387a73b90ada981885010dd9aea134d6de30cd24cb8/virtualenv-15.1.0.tar.gz#md5=44e19f4134906fe2d75124427dc9b716
tar -zxvf virtualenv-15.1.0.tar.gz
cd virtualenv-15.1.0/
../Python-2.7.18/.localpython/bin/python setup.py install
../Python-2.7.18/.localpython/bin/python virtualenv.py easymap-env -p ../Python-2.7.18/.localpython/bin/python

# Installing Pillow
mkdir cache # This is still inside of the "virtualenv-15.1.0" dir
easymap-env/bin/pip -qq install Pillow --cache-dir cache
cd ../.. # Should be in "easymap.v2" dir

#cp fonts/check.1.fa user_data/
#cp fonts/check.gff user_data/
#module load fastp
#./easymap -n setup -w snp -sim -r check -g check.gff -ed ref_bc_parmut

echo "========== Install Complete =========="
echo "Before running easymap, make sure to run \"module load fastp\""
echo "to load fastp. Additionally, you'll want to add"
echo "\"export PATH=$(pwd):\${PATH}\" to your \"~/.bashrc\" file."
echo "======================================"

After the install, you must modify your .bashrc file (located in your home directory) to add easymap to your $PATH variable. The final line in the script should output a line similar to export PATH=/rhome/your_username/..../easymap.v2:${PATH}. Append this line to ~/.bashrc, then log out and back in to SSH/Jupyter/RStudio/OnDemand for the changes to apply.

Please provide any feedback/recommendations on the install process :slight_smile: