From b361fb705f5b6921aa6e6a9e6b656064bcf5525f Mon Sep 17 00:00:00 2001 From: don Date: Thu, 9 Aug 2018 12:40:21 -0700 Subject: [PATCH] Convert from Docker to Singularity for cfe-lab/Kive#737. --- .gitignore | 1 + Singularity | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 Singularity diff --git a/.gitignore b/.gitignore index 78458412e..76e247925 100755 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ /micall/tests/working/* /micall/tests/microtest/Results !/micall/tests/working/*.launch +/micall-*.simg /timing.* .DS_Store */.DS_Store diff --git a/Singularity b/Singularity new file mode 100644 index 000000000..a9f59102b --- /dev/null +++ b/Singularity @@ -0,0 +1,60 @@ +# Generate the Singularity container to run MiCall on Kive. +Bootstrap: docker +From: python:3.4 + +%help + MiCall maps all the reads from a sample against a set of reference + sequences, then stitches all the reads into consensus sequences and + coverage maps. + + This Singularity container can be run on Kive: http://cfe-lab.github.io/Kive + +%label + MAINTAINER BC CfE in HIV/AIDS /~https://github.com/cfe-lab/MiCall + +%setup + # Unneeded once Singularity creates parent dirs: + # /~https://github.com/singularityware/singularity/issues/1549 + mkdir ${SINGULARITY_ROOTFS}/opt/micall + mkdir ${SINGULARITY_ROOTFS}/opt/micall/micall + +%files + ## MiCall + micall_basespace.py /opt/micall/ + micall_kive.py /opt/micall/ + micall_kive_resistance.py /opt/micall/ + micall/__init__.py /opt/micall/micall/ + micall/project* /opt/micall/micall/ + + micall/core /opt/micall/micall/core/ + micall/drivers /opt/micall/micall/drivers/ + micall/g2p /opt/micall/micall/g2p/ + micall/resistance /opt/micall/micall/resistance/ + micall/monitor /opt/micall/micall/monitor/ + micall/utils /opt/micall/micall/utils/ + + ## Gotoh + micall/alignment /opt/micall/alignment + requirements.txt /opt/micall/ + requirements-basespace.txt /opt/micall/ + +%post + ## Prerequisites + apt-get update -qq --fix-missing + apt-get install -qq -y unzip wget + rm -rf /var/lib/apt/lists/* + + ## bowtie2 + wget -q -O bowtie2.zip /~https://github.com/BenLangmead/bowtie2/releases/download/v2.2.8/bowtie2-2.2.8-linux-x86_64.zip + unzip bowtie2.zip -d /opt/ + ln -s /opt/bowtie2-2.2.8/ /opt/bowtie2 + rm bowtie2.zip + + ## Python packages, plus trigger matplotlib to build its font cache + cd /opt + pip install -r /opt/micall/requirements-basespace.txt + ln -s /usr/local/bin/cutadapt /usr/local/bin/cutadapt-1.11 + /usr/local/bin/python -c 'import matplotlib; matplotlib.use("Agg"); import matplotlib.pyplot' + +%environment + export PATH=$PATH:/opt/bowtie2 \ No newline at end of file