forked from StaPH-B/docker-builds
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
65 lines (51 loc) · 2 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
ARG DSK_VER="2.3.3"
FROM ubuntu:jammy as app
ARG DSK_VER
ARG GATBCORE_VER="1.4.2"
LABEL base.image="ubuntu:jammy"
LABEL dockerfile.version="1"
LABEL software="DSK"
LABEL software.version=${DSK_VER}
LABEL description="DSK is a k-mer counter for reads or genomes."
LABEL website="https://github.com/GATB/dsk"
LABEL documentation="https://gatb.inria.fr/software/dsk/"
LABEL license="https://github.com/GATB/dsk/blob/master/LICENSE"
LABEL maintainer="Erin Young"
LABEL maintainer.email="[email protected]"
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends\
build-essential \
cmake \
wget \
libz-dev \
ca-certificates && \
apt-get autoclean && rm -rf /var/lib/apt/lists/*
# Download DSK source code
RUN wget -q https://github.com/GATB/dsk/releases/download/v${DSK_VER}/dsk-v${DSK_VER}-bin-Linux.tar.gz && \
tar -vxf dsk-v${DSK_VER}-bin-Linux.tar.gz && \
rm -rf dsk-v${DSK_VER}-bin-Linux.tar.gz && \
wget -q https://github.com/GATB/gatb-core/releases/download/v${GATBCORE_VER}/gatb-core-${GATBCORE_VER}-bin-Linux.tar.gz && \
tar -xvf gatb-core-${GATBCORE_VER}-bin-Linux.tar.gz && \
rm -rf gatb-core-${GATBCORE_VER}-bin-Linux.tar.gz && \
cp /gatb-core-${GATBCORE_VER}-bin-Linux/bin/* /dsk-v${DSK_VER}-bin-Linux/bin && \
rm -rf /gatb-core-${GATBCORE_VER}-bin-Linux && \
mkdir /data
# Add DSK executable to PATH
ENV PATH="/dsk-v${DSK_VER}-bin-Linux/bin:$PATH"
CMD dsk
WORKDIR /data
FROM app as test
ARG DSK_VER
RUN dsk
# Run DSK's internal tests
WORKDIR /dsk-v${DSK_VER}-bin-Linux/test
RUN bash ./simple_test.sh
# Run DSK on sample file
WORKDIR /test
RUN wget -q https://github.com/StaPH-B/docker-builds/raw/master/tests/SARS-CoV-2/SRR13957123_1.fastq.gz && \
dsk -file SRR13957123_1.fastq.gz -kmer-size 31 && \
ls && \
gatb-h5dump -y -d dsk/solid/0 SRR13957123_1.fastq.h5 && \
gatb-h5dump -y -d histogram/histogram SRR13957123_1.fastq.h5 && \
dsk2ascii -file SRR13957123_1.fastq.h5 -out output.txt && \
head output.txt