forked from StaPH-B/docker-builds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
65 lines (51 loc) · 2.38 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
FROM mambaorg/micromamba:0.24.0 as app
# Version arguments
# ARG variables only persist during build time
# THIS ARG ONLY USED FOR A LABEL. VERSION SPECIFIED IN PANAROO-ENVIRONMENT.YML
ARG PANAROO_SOFTWARE_VERSION="1.3.4"
# build and run as root users since micromamba image has 'mambauser' set as the $USER
USER root
# set workdir to default for building; set to /data at the end
WORKDIR /
LABEL base.image="mambaorg/micromamba:0.24.0"
LABEL dockerfile.version="1"
LABEL software="Panaroo"
LABEL software.version=${PANAROO_SOFTWARE_VERSION}
LABEL description="An updated pipeline for pangenome investigation"
LABEL website="https://github.com/gtonkinhill/panaroo"
LABEL license="https://github.com/gtonkinhill/panaroo/blob/master/LICENSE"
LABEL maintainer="Kevin Libuit"
LABEL maintainer.email="[email protected]"
# install dependencies; cleanup apt garbage
RUN apt-get update && apt-get install -y --no-install-recommends \
wget \
ca-certificates \
procps && \
apt-get autoclean && rm -rf /var/lib/apt/lists/*
# Install Panaroo conda environment into base environment
# clean up conda garbage
# conda environment includes optional tools prokka, prank, mafft, clustal, and mash
RUN micromamba install -y -n base -c conda-forge -c bioconda -c defaults python=3.9 panaroo=${PANAROO_SOFTWARE_VERSION} && \
micromamba clean -a -y
# set the environment, put new conda env in PATH by default
ENV PATH="/opt/conda/bin:/opt/conda/envs/base/bin:${PATH}" \
LC_ALL=C.UTF-8
# set working directory to /data
WORKDIR /data
# set default command
CMD panaroo -h
# new base for testing
FROM app as test
# checks to see if tool is in PATH
RUN panaroo --version && panaroo -h
WORKDIR /test
# Grab test data from 1.2.10
RUN wget -q https://raw.githubusercontent.com/StaPH-B/docker-builds/master/panaroo/1.2.10/tests/ecoli_1.gff && \
wget -q https://raw.githubusercontent.com/StaPH-B/docker-builds/master/panaroo/1.2.10/tests/ecoli_2.gff && \
wget -q https://raw.githubusercontent.com/StaPH-B/docker-builds/master/panaroo/1.2.10/tests/gene_data.csv && \
wget -q https://raw.githubusercontent.com/StaPH-B/docker-builds/master/panaroo/1.2.10/tests/summary_statistics.txt
# Run Panaroo
RUN panaroo --clean-mode strict -i *.gff -o panaroo_results/
RUN head panaroo_results/summary_statistics.txt && \
head summary_statistics.txt && \
cmp summary_statistics.txt panaroo_results/summary_statistics.txt