forked from StaPH-B/docker-builds
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
59 lines (46 loc) · 1.98 KB
/
Dockerfile
File metadata and controls
59 lines (46 loc) · 1.98 KB
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
# Base image: micromamba for Conda support
FROM mambaorg/micromamba:2.0.5-ubuntu22.04 AS app
USER root
WORKDIR /
# Set the DnaApler version
ARG DNAAPLER_VER="1.1.0"
# Metadata labels
LABEL base.image="mambaorg/micromamba:2.0.5-ubuntu22.04"
LABEL dockerfile.version="1"
LABEL software="dnaapler"
LABEL software.version="${DNAAPLER_VER}"
LABEL description="Rotates chromosomes and more"
LABEL website="https://github.com/gbouras13/dnaapler"
LABEL license="MIT"
LABEL license.url="https://github.com/gbouras13/dnaapler/blob/main/LICENSE"
LABEL maintainer="Fraser Combe"
LABEL maintainer.email="fraser.combe@theiagen.com"
# Install dependencies; clean up 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/*
# Create the conda environment, install dnaapler via bioconda package; clean up micromamba garbage
RUN micromamba create -n dnaapler -y -c conda-forge -c bioconda dnaapler=${DNAAPLER_VER} && \
micromamba clean -a -f -y
# Set PATH and LC_ALL for compatibility
ENV PATH="/opt/conda/envs/dnaapler/bin/:${PATH}" \
LC_ALL=C.UTF-8
# Set working directory to /data
WORKDIR /data
# Default command to display help
CMD [ "dnaapler", "--help" ]
# New stage for testing
FROM app AS test
# Set working directory to /test
WORKDIR /test
# Test the tool installation and functionality
RUN dnaapler --help && dnaapler --version
# Download test genome and run DnaApler commands
RUN wget -q https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/025/259/185/GCA_025259185.1_ASM2525918v1/GCA_025259185.1_ASM2525918v1_genomic.fna.gz && \
gunzip GCA_025259185.1_ASM2525918v1_genomic.fna.gz && \
grep "CP104365.1" GCA_025259185.1_ASM2525918v1_genomic.fna -A 50000 > CP104365.1.fasta && \
dnaapler mystery --prefix mystery_test --output mystery_test -i CP104365.1.fasta && \
dnaapler plasmid --prefix plasmid_test --output plasmid_test -i CP104365.1.fasta && \
ls mystery_test plasmid_test