Skip to content

Instantly share code, notes, and snippets.

@telatin
Created December 7, 2020 16:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save telatin/c40b9fa37451c8d2794b9432a0e7460e to your computer and use it in GitHub Desktop.
Save telatin/c40b9fa37451c8d2794b9432a0e7460e to your computer and use it in GitHub Desktop.
Singularity definition for BactSNP
Bootstrap: docker
From: centos:centos7.6.1810
%environment
source /opt/software/conda/bin/activate /opt/software/conda_env
%post
yum -y install epel-release wget which nano curl zlib-devel
yum -y groupinstall "Development Tools"
mkdir -p /opt/software
cd /opt/software
curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
sh ./Miniconda3-latest-Linux-x86_64.sh -p /opt/software/conda -b
/opt/software/conda/bin/conda config --add channels defaults
/opt/software/conda/bin/conda config --add channels conda-forge
/opt/software/conda/bin/conda config --add channels bioconda
/opt/software/conda/bin/conda create -p /opt/software/conda_env -y samtools=1.3 picard art mummer=3.23
source /opt/software/conda/bin/activate /opt/software/conda_env
wget https://github.com/IEkAdN/BactSNP/releases/download/v1.1.0/bactsnp-1.1.0.linux64.tgz
tar xf bactsnp-1.1.0.linux64.tgz
rm bactsnp-1.1.0.linux64.tgz
cd bactsnp-1.1.0.linux64
make
mv bactsnp /opt/software/conda_env/bin/
cd /opt/software
%runscript
exec bactsnp "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment