-
Notifications
You must be signed in to change notification settings - Fork 124
/
Dockerfile
71 lines (57 loc) · 2.39 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
66
67
68
69
70
71
FROM staphb/samtools:1.19 as samtools
FROM staphb/htslib:1.19 as htslib
# As a reminder
# https://github.com/StaPH-B/docker-builds/pull/925#issuecomment-2010553275
# bbmap/docs/TableOfContents.txt lists additional dependencies
FROM ubuntu:jammy as app
ARG SAMBAMBAVER=1.0.1
ARG BBTOOLSVER=39.06
LABEL base.image="ubuntu:jammy"
LABEL dockerfile.version="1"
LABEL software="BBTools"
LABEL software.version=${BBTOOLSVER}
LABEL description="A set of tools labeled as \"Bestus Bioinformaticus\""
LABEL website="https://sourceforge.net/projects/bbmap"
LABEL documentation="https://jgi.doe.gov/data-and-tools/bbtools/bb-tools-user-guide/"
LABEL license="https://jgi.doe.gov/disclaimer/"
LABEL maintainer="Abigail Shockey"
LABEL maintainer.email="[email protected]"
LABEL maintainer2="Padraic Fanning"
LABEL maintainer2.email="faninnpm AT miamioh DOT edu"
RUN apt-get update && \
apt-get install --no-install-recommends -y \
openjdk-8-jre-headless \
pigz \
pbzip2 \
lbzip2 \
bzip2 \
wget \
ca-certificates \
procps && \
rm -rf /var/lib/apt/lists/* && \
apt-get autoclean
# copy samtools to image
COPY --from=samtools /usr/local/bin/* /usr/local/bin/
COPY --from=htslib /usr/local/bin/* /usr/local/bin/
# download and install sambamba
RUN wget -q https://github.com/biod/sambamba/releases/download/v${SAMBAMBAVER}/sambamba-${SAMBAMBAVER}-linux-amd64-static.gz && \
gzip -d sambamba-${SAMBAMBAVER}-linux-amd64-static.gz && \
mv sambamba-${SAMBAMBAVER}-linux-amd64-static /usr/local/bin/sambamba && \
chmod +x /usr/local/bin/sambamba
# download and install bbtools
RUN wget -q https://sourceforge.net/projects/bbmap/files/BBMap_${BBTOOLSVER}.tar.gz && \
tar -xzf BBMap_${BBTOOLSVER}.tar.gz && \
rm BBMap_${BBTOOLSVER}.tar.gz && \
mkdir /data
ENV PATH=/bbmap/:$PATH \
LC_ALL=C
CMD for tool in $(ls /bbmap/*sh | cut -f 3 -d "/") ; do $tool -h ; done
WORKDIR /data
# testing
FROM app as test
# testing that '-h' works for all tools
RUN for tool in $(ls /bbmap/*sh | cut -f 3 -d "/") ; do $tool -h ; done
# get test data and test one thing that uses samtools/sambamba
RUN wget -q https://raw.githubusercontent.com/StaPH-B/docker-builds/master/tests/SARS-CoV-2/SRR13957123.primertrim.sorted.bam && \
streamsam.sh in='SRR13957123.primertrim.sorted.bam' out='test_SRR13957123.primertrim.sorted.fastq.gz' && \
test -f test_SRR13957123.primertrim.sorted.fastq.gz