From b150232b706eef74f5be80b2f08ffb56385481d4 Mon Sep 17 00:00:00 2001
From: Laurent Modolo <laurent.modolo@ens-lyon.fr>
Date: Fri, 29 Mar 2019 15:12:25 +0100
Subject: [PATCH] hisat2: add v2.1.0

---
 src/docker_modules/hisat2/2.1.0/Dockerfile    | 20 ++++++++
 .../hisat2/2.1.0/docker_init.sh               |  2 +
 src/nf_modules/hisat2/indexing.config         |  6 +--
 src/nf_modules/hisat2/mapping_paired.config   |  6 +--
 src/nf_modules/hisat2/mapping_single.config   |  6 +--
 src/psmn_modules                              |  2 +-
 src/singularity_modules/hisat2/2.1.0/build.sh |  3 ++
 .../hisat2/2.1.0/hisat2.def                   | 50 +++++++++++++++++++
 8 files changed, 85 insertions(+), 10 deletions(-)
 create mode 100644 src/docker_modules/hisat2/2.1.0/Dockerfile
 create mode 100755 src/docker_modules/hisat2/2.1.0/docker_init.sh
 create mode 100755 src/singularity_modules/hisat2/2.1.0/build.sh
 create mode 100644 src/singularity_modules/hisat2/2.1.0/hisat2.def

diff --git a/src/docker_modules/hisat2/2.1.0/Dockerfile b/src/docker_modules/hisat2/2.1.0/Dockerfile
new file mode 100644
index 00000000..5f937ce5
--- /dev/null
+++ b/src/docker_modules/hisat2/2.1.0/Dockerfile
@@ -0,0 +1,20 @@
+FROM samtools:1.7
+MAINTAINER Nicolas Fontrodona
+
+ENV HISAT2_VERSION=2.1.0
+ENV PACKAGES curl \
+             zip \
+             g++ \
+             perl \
+             python
+
+RUN apk update && \
+    apk add ${PACKAGES}
+
+RUN curl -k -L http://ccb.jhu.edu/software/hisat2/dl/hisat2-${HISAT2_VERSION}-source.zip -o hisat2_linux-v${HISAT2_VERSION}.zip && \
+unzip hisat2_linux-v${HISAT2_VERSION}.zip && \
+cd hisat2-${HISAT2_VERSION} && \
+make && \
+cp hisat2 /usr/bin && \
+cp hisat2-* /usr/bin && \
+rm -Rf hisat2-${HISAT2_VERSION}
diff --git a/src/docker_modules/hisat2/2.1.0/docker_init.sh b/src/docker_modules/hisat2/2.1.0/docker_init.sh
new file mode 100755
index 00000000..3004f07a
--- /dev/null
+++ b/src/docker_modules/hisat2/2.1.0/docker_init.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+docker build src/docker_modules/hisat2/2.1.0 -t 'hisat2:2.1.0'
diff --git a/src/nf_modules/hisat2/indexing.config b/src/nf_modules/hisat2/indexing.config
index 47c14a57..b259633a 100644
--- a/src/nf_modules/hisat2/indexing.config
+++ b/src/nf_modules/hisat2/indexing.config
@@ -4,7 +4,7 @@ profiles {
     docker.enabled = true
     process {
       withName: index_fasta {
-        container = "hisat2:2.0.0"
+        container = "hisat2:2.1.0"
         cpus = 4
       }
     }
@@ -14,7 +14,7 @@ profiles {
     process {
       withName: index_fasta {
         cpus = 4
-        container = "file://bin/hisat2:2.0.0.sif"
+        container = "file://bin/hisat2:2.1.0.sif"
       }
     }
   }
@@ -22,7 +22,7 @@ profiles {
     process{
       withName: index_fasta {
         beforeScript = "source /usr/share/lmod/lmod/init/bash; module use ~/privatemodules"
-        module = "hisat2/2.0.0"
+        module = "hisat2/2.1.0"
         executor = "sge"
         clusterOptions = "-cwd -V"
         memory = "20GB"
diff --git a/src/nf_modules/hisat2/mapping_paired.config b/src/nf_modules/hisat2/mapping_paired.config
index e23abd8a..02c92edf 100644
--- a/src/nf_modules/hisat2/mapping_paired.config
+++ b/src/nf_modules/hisat2/mapping_paired.config
@@ -5,7 +5,7 @@ profiles {
     process {
       withName: mapping_fastq {
         cpus = 4
-        container = "hisat2:2.0.0"
+        container = "hisat2:2.1.0"
       }
     }
   }
@@ -14,7 +14,7 @@ profiles {
     process {
       withName: mapping_fastq {
         cpus = 4
-        container = "file://bin/hisat2:2.0.0.sif"
+        container = "file://bin/hisat2:2.1.0.sif"
       }
     }
   }
@@ -22,7 +22,7 @@ profiles {
     process{
       withName: mapping_fastq {
         beforeScript = "source /usr/share/lmod/lmod/init/bash; module use ~/privatemodules"
-        module = "hisat2/2.0.0:samtools/1.7"
+        module = "hisat2/2.1.0:samtools/1.7"
         executor = "sge"
         clusterOptions = "-cwd -V"
         memory = "20GB"
diff --git a/src/nf_modules/hisat2/mapping_single.config b/src/nf_modules/hisat2/mapping_single.config
index e23abd8a..02c92edf 100644
--- a/src/nf_modules/hisat2/mapping_single.config
+++ b/src/nf_modules/hisat2/mapping_single.config
@@ -5,7 +5,7 @@ profiles {
     process {
       withName: mapping_fastq {
         cpus = 4
-        container = "hisat2:2.0.0"
+        container = "hisat2:2.1.0"
       }
     }
   }
@@ -14,7 +14,7 @@ profiles {
     process {
       withName: mapping_fastq {
         cpus = 4
-        container = "file://bin/hisat2:2.0.0.sif"
+        container = "file://bin/hisat2:2.1.0.sif"
       }
     }
   }
@@ -22,7 +22,7 @@ profiles {
     process{
       withName: mapping_fastq {
         beforeScript = "source /usr/share/lmod/lmod/init/bash; module use ~/privatemodules"
-        module = "hisat2/2.0.0:samtools/1.7"
+        module = "hisat2/2.1.0:samtools/1.7"
         executor = "sge"
         clusterOptions = "-cwd -V"
         memory = "20GB"
diff --git a/src/psmn_modules b/src/psmn_modules
index 9ae41bf7..746ce102 160000
--- a/src/psmn_modules
+++ b/src/psmn_modules
@@ -1 +1 @@
-Subproject commit 9ae41bf72d4f536d73a76dfd13e375bca7d4f48e
+Subproject commit 746ce10272091f40f3c98e6972dede47df4b0beb
diff --git a/src/singularity_modules/hisat2/2.1.0/build.sh b/src/singularity_modules/hisat2/2.1.0/build.sh
new file mode 100755
index 00000000..074f4ce6
--- /dev/null
+++ b/src/singularity_modules/hisat2/2.1.0/build.sh
@@ -0,0 +1,3 @@
+#/bin/sh
+sudo singularity build --force bin/hisat2:2.1.0.sif src/singularity_modules/hisat2/2.1.0/hisat2.def && \
+singularity sign bin/hisat2:2.1.0.sif
diff --git a/src/singularity_modules/hisat2/2.1.0/hisat2.def b/src/singularity_modules/hisat2/2.1.0/hisat2.def
new file mode 100644
index 00000000..c6358b11
--- /dev/null
+++ b/src/singularity_modules/hisat2/2.1.0/hisat2.def
@@ -0,0 +1,50 @@
+Bootstrap: docker
+From: alpine:3.8
+
+%labels
+MAINTAINER Laurent Modolo
+
+%post
+SAMTOOLS_VERSION=1.7
+HISAT2_VERSION=2.1.0
+PACKAGES="git \
+          make \
+          gcc \
+          musl-dev \
+          zlib-dev \
+          ncurses-dev \
+          bzip2-dev \
+          xz-dev \
+          bash \
+          curl \
+          zip \
+          g++ \
+          perl \
+          python"
+apk update && \
+apk add ${PACKAGES}
+
+git clone https://github.com/samtools/htslib.git && \
+cd htslib && \
+git checkout ${SAMTOOLS_VERSION}  && \
+cd .. && \
+git clone https://github.com/samtools/samtools.git && \
+cd samtools && \
+git checkout ${SAMTOOLS_VERSION} && \
+make && \
+cp samtools /usr/bin/
+
+curl -k -L http://ccb.jhu.edu/software/hisat2/dl/hisat2-${HISAT2_VERSION}-source.zip -o hisat2_linux-v${HISAT2_VERSION}.zip && \
+unzip hisat2_linux-v${HISAT2_VERSION}.zip && \
+cd hisat2-${HISAT2_VERSION} && \
+make && \
+cp hisat2 /usr/bin && \
+cp hisat2-* /usr/bin && \
+rm -Rf hisat2-${HISAT2_VERSION}
+
+%environment
+export SAMTOOLS_VERSION=1.7
+export HISAT2_VERSION=2.1.0
+
+%runscript
+exec /bin/bash "$@"
-- 
GitLab