From 381d3ca4d5a34e4debf6d342c46f7fbbaf47aa73 Mon Sep 17 00:00:00 2001
From: Pablo Escobar <pablo.escobarlopez@unibas.ch>
Date: Sun, 4 Mar 2018 19:31:13 +0100
Subject: [PATCH] added an example singularity file installing conda

---
 singularity_conda.def | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 singularity_conda.def

diff --git a/singularity_conda.def b/singularity_conda.def
new file mode 100644
index 0000000..a442904
--- /dev/null
+++ b/singularity_conda.def
@@ -0,0 +1,36 @@
+BootStrap: docker
+From: ubuntu:16.04
+
+%post
+    # install some system deps
+    apt-get -y update
+    apt-get -y install locales curl bzip2
+    locale-gen en_US.UTF-8
+    apt-get clean
+
+    # download and install miniconda2
+    curl -sSL -O https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh
+    bash Miniconda2-latest-Linux-x86_64.sh -p /opt/miniconda2 -b
+    rm -fr Miniconda2-latest-Linux-x86_64.sh
+
+    # use conda to install some bioinfo tools
+    conda install --yes -c bioconda samtools==1.7
+    conda install --yes -c bioconda bwa=0.7.8
+
+%environment
+    export LANG=en_US.UTF-8
+    export LANGUAGE=en_US:en
+    export LC_ALL=en_US.UTF-8
+    export PATH=/opt/miniconda2/bin:$PATH
+
+%apphelp samtools
+    "samtools version 1.7"
+
+%apprun samtools
+    /opt/miniconda2/bin/samtools
+
+%apphelp bwa
+    "BWA version 0.7.8"
+
+%apprun bwa
+    /opt/miniconda2/bin/bwa
-- 
GitLab