forked from StaPH-B/docker-builds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
101 lines (81 loc) · 3.83 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
ARG ARTIC_VER=1.2.4
FROM mambaorg/micromamba:1.4.9 as app
ARG ARTIC_VER
ARG MEDAKA_VER=1.11.1
LABEL base.image="ubuntu:jammy"
LABEL dockerfile.version="1"
LABEL software="artic"
LABEL software.version="${ARTIC_VER}"
LABEL software1="medaka"
LABEL software1.version="${MEDAKA_VER}"
LABEL description="A bioinformatics pipeline for working with virus sequencing data sequenced with nanopore"
LABEL website="https://github.com/artic-network/fieldbioinformatics"
LABEL license="https://github.com/artic-network/fieldbioinformatics/blob/master/LICENSE"
LABEL sop="https://artic.network/ncov-2019/ncov2019-bioinformatics-sop.html"
LABEL maintainer="Erin Young"
LABEL maintainer.email="[email protected]"
USER root
WORKDIR /
RUN apt-get update && apt-get install -y --no-install-recommends \
wget \
ca-certificates \
procps \
gcc \
make \
pkg-config \
zlib1g-dev \
libbz2-dev \
liblzma-dev \
libcurl4-gnutls-dev \
libssl-dev \
python3-dev \
python3-pip \
python-is-python3 && \
apt-get autoclean && rm -rf /var/lib/apt/lists/*
RUN wget -q https://github.com/artic-network/fieldbioinformatics/archive/refs/tags/v${ARTIC_VER}.tar.gz && \
tar -xzf v${ARTIC_VER}.tar.gz && \
micromamba env create -y -f /fieldbioinformatics-${ARTIC_VER}/environment.yml && \
rm v${ARTIC_VER}.tar.gz && \
cd fieldbioinformatics-${ARTIC_VER} && \
python setup.py install && \
artic -v && \
mkdir /data
ENV ENV_NAME="artic"
ARG MAMBA_DOCKERFILE_ACTIVATE=1
RUN /opt/conda/envs/artic/bin/pip install setuptools wheel cython medaka==${MEDAKA_VER} && \
medaka --version && \
/opt/conda/envs/artic/bin/pip install pyabpoa==1.2.4
ENV PATH="${PATH}:/opt/conda/envs/artic/bin/" \
LC_ALL=C.UTF-8
CMD artic --help
WORKDIR /data
##### ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- #####
##### Step 2. Set up the testing stage. #####
##### The docker image is built to the 'test' stage before merging, but #####
##### the test stage (or any stage after 'app') will be lost. #####
##### ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- #####
# A second FROM insruction creates a new stage
# new base for testing
FROM app as test
ARG ARTIC_VER
# print help and version info; check dependencies (not all software has these options available)
# Mostly this ensures the tool of choice is in path and is executable
RUN artic --help && \
artic --version
# listing available models
RUN medaka tools list\_models
# set working directory so that all test inputs & outputs are kept in /test
WORKDIR /fieldbioinformatics-${ARTIC_VER}
# test that came with artic
RUN bash ./test-runner.sh medaka && bash ./test-runner.sh nanopolish
WORKDIR /test
# using on "real" data (sample files were not sequenced with version 5.3.2 primers)
RUN wget -q ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR224/050/SRR22452250/SRR22452250_1.fastq.gz && \
artic guppyplex --min-length 400 --max-length 700 --directory . --prefix SRR22452250_1.fastq.gz --output SRR22452250_1_filtered.fastq.gz && \
mkdir -p dir/name/V5 && \
wget -q https://raw.githubusercontent.com/artic-network/primer-schemes/master/nCoV-2019/V5.3.2/SARS-CoV-2.primer.bed -O dir/name/V5/name.primer.bed && \
wget -q https://raw.githubusercontent.com/artic-network/primer-schemes/master/nCoV-2019/V5.3.2/SARS-CoV-2.reference.fasta -O dir/name/V5/name.reference.fasta && \
wget -q https://raw.githubusercontent.com/artic-network/primer-schemes/master/nCoV-2019/V5.3.2/SARS-CoV-2.scheme.bed -O dir/name/V5/name.scheme.bed && \
samtools faidx dir/name/V5/name.reference.fasta && \
artic minion --normalise 200 --skip-nanopolish --medaka --medaka-model r941_min_high_g360 --threads 4 --read-file SRR22452250_1_filtered.fastq.gz --scheme-directory ./dir --scheme-version 5 name final && \
ls final*