Last active
November 24, 2021 13:14
-
-
Save stephenturner/4d0cf51e9695128035df78c484cc18a1 to your computer and use it in GitHub Desktop.
Install htslib, bcftools, samtools to home directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compile and install htslib, bcftools, samtools 1.9 to home directory | |
# Set up dirs where stuff will be installed | |
mkdir -p ${HOME}/bin/htslib | |
mkdir -p ${HOME}/bin/bcftools | |
mkdir -p ${HOME}/bin/samtools | |
# Make a dir to build | |
mkdir -p ${HOME}/tmp | |
# htslib | |
cd ${HOME}/tmp | |
wget https://github.com/samtools/htslib/releases/download/1.9/htslib-1.9.tar.bz2 | |
tar xjf htslib-1.9.tar.bz2 | |
cd htslib-1.9 | |
./configure --prefix=${HOME}/bin/htslib | |
make -j4 | |
make install | |
# bcftools | |
cd ${HOME}/tmp | |
wget https://github.com/samtools/bcftools/releases/download/1.9/bcftools-1.9.tar.bz2 | |
tar xjf bcftools-1.9.tar.bz2 | |
cd bcftools-1.9 | |
./configure --prefix=${HOME}/bin/bcftools | |
make -j4 | |
make install | |
# samtools | |
cd ${HOME}/tmp | |
wget https://github.com/samtools/samtools/releases/download/1.9/samtools-1.9.tar.bz2 | |
tar xjf samtools-1.9.tar.bz2 | |
cd samtools-1.9 | |
./configure --prefix=${HOME}/bin/samtools --without-curses | |
make -j4 | |
make install | |
# add to path | |
echo 'PATH=${HOME}/bin/htslib/bin:${HOME}/bin/bcftools/bin:${HOME}/bin/samtools/bin:$PATH' >> ${HOME}/.bashrc | |
echo 'BCFTOOLS_PLUGINS=${HOME}/bin/bcftools/libexec/bcftools' >> ${HOME}/.bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment