6
6
# docker build --tag nextits --file NextITS.dockerfile .
7
7
8
8
## Build stage 1 (Rust and Cargo)
9
- FROM rust:1.64 AS RUST
10
- RUN cargo install runiq sd
9
+ FROM rust:1.84.1 AS rust
10
+ RUN cargo install runiq sd
11
+
12
+ # Stage 2 (Nextflow - minimal stage)
13
+ FROM nextflow/nextflow:24.10.5 AS nextflow
11
14
12
15
## Build stage 2 - Main
13
- FROM rocker/r-ver:4.2 .2 AS MAIN
16
+ FROM rocker/r-ver:4.4 .2 AS main
14
17
15
18
ENV LANG=C.UTF-8
16
19
ENV LC_ALL=C.UTF-8
17
20
ENV SHELL=/bin/bash
18
21
ENV CONDA_PREFIX="/opt/software/conda"
19
22
ENV PATH=${PATH}:"/opt/software/conda/bin/"
20
- ENV JAVA_OPTS=-Djdk.lang.Process.launchMechanism=vfork
21
23
LABEL org.opencontainers.image.authors="
[email protected] "
24
+ LABEL org.opencontainers.image.version="0.8.2"
22
25
23
26
RUN apt-get update -qq \
24
27
&& apt-get -y --no-install-recommends install \
25
- tar zip unzip pigz gzip coreutils \
28
+ tar zip unzip pigz gzip zstd xz-utils bzip2 coreutils \
26
29
curl wget git less gawk nano rename bc \
27
30
ca-certificates locales \
28
- libtre-dev libtre5 zlib1g zlib1g-dev \
31
+ libtre-dev libtre5 zlib1g zlib1g-dev liblzma-dev libbz2-dev libcurl4-openssl-dev libglpk-dev libglpk40 \
29
32
build-essential \
30
33
&& apt-get clean \
31
34
&& rm -rf /var/lib/apt/lists/*
@@ -36,51 +39,72 @@ RUN install2.r --error --skipinstalled --ncpus -1 \
36
39
optparse \
37
40
R.utils \
38
41
data.table \
42
+ arrow \
43
+ duckdb \
39
44
BiocManager \
40
45
plyr \
46
+ dplyr \
41
47
ggplot2 \
42
48
doFuture \
43
49
openxlsx
44
50
45
51
RUN R -e 'BiocManager::install("Biostrings", ask = FALSE)' \
52
+ && R -e 'BiocManager::install("ShortRead", ask = FALSE)' \
46
53
&& R -e 'BiocManager::install("DECIPHER", ask = FALSE)' \
54
+ && R -e 'BiocManager::install("dada2", ask = FALSE)' \
55
+ && R -e 'BiocManager::install("phyloseq", ask = FALSE)' \
47
56
&& R -e 'remotes::install_github("vmikk/metagMisc")' \
57
+ && R -e 'remotes::install_cran("qs", type = "source", configure.args = "--with-simd=AVX2")' \
48
58
&& rm -rf /tmp/downloaded_packages/
49
59
50
60
## Install conda
51
61
RUN mkdir -p /opt/software \
52
62
&& cd /opt/software \
53
63
&& curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
54
- && bash ./ Miniconda3-latest-Linux-x86_64.sh -u -b -p ${CONDA_PREFIX} \
64
+ && bash Miniconda3-latest-Linux-x86_64.sh -u -b -p ${CONDA_PREFIX} \
55
65
&& rm Miniconda3-latest-Linux-x86_64.sh \
56
66
&& ${CONDA_PREFIX}/bin/conda config --add channels defaults \
57
67
&& ${CONDA_PREFIX}/bin/conda config --add channels conda-forge \
58
68
&& ${CONDA_PREFIX}/bin/conda config --add channels bioconda \
59
- && ${CONDA_PREFIX}/bin/conda install -y -c conda-forge mamba
69
+ && ${CONDA_PREFIX}/bin/conda install --quiet --yes mamba "python=3.12"
60
70
61
71
## Create conda environment and install software
62
72
RUN ${CONDA_PREFIX}/bin/mamba install -y \
63
- "nextflow>=22.10.6" \
64
- "lima>=2.7.1" \
65
- "vsearch>=2.22.1" \
66
- "swarm>=3.1.3" \
67
- "seqkit>=2.3.1" \
68
- "seqfu>=1.17.1" \
69
- "fastp>=0.23.2" \
70
- "blast>=2.13.0" \
73
+ -c conda-forge -c bioconda \
74
+ "lima>=2.12.0" \
75
+ "pbtk>=3.4.0" \
76
+ "vsearch>=2.29.4" \
77
+ "swarm>=3.1.5" \
78
+ "seqkit>=2.9.0" \
79
+ "seqfu>=1.22.3" \
80
+ "fastp>=0.24.0" \
81
+ "blast>=2.16.0" \
71
82
"bioawk" \
72
- "miller>=6.6.0" \
73
- "bedtools>=2.30.0" \
74
- "parallel>=20230122" \
75
- "csvtk>=0.25.0" \
83
+ "miller>=6.13.0" \
84
+ "xsv>=0.13.0" \
85
+ "bedtools>=2.31.1" \
86
+ "parallel>=20241122" \
87
+ "csvtk>=0.31.0" \
76
88
"itsx>=1.1.3" \
77
- "itsxpress>=1.8 .0" \
78
- "cutadapt>=4.2 " \
79
- "bbmap>=39.01 " \
80
- "ripgrep>=13.0 .0" \
81
- "fd-find>=8.5.3 " \
89
+ "cutadapt>=5 .0" \
90
+ "bbmap>=39.15 " \
91
+ "ripgrep>=14.1.1 " \
92
+ "fd-find>=10.2 .0" \
93
+ "mmseqs2 " \
82
94
&& ${CONDA_PREFIX}/bin/mamba clean --all --yes
83
95
96
+ ## Add new tools (seqhasher, phredsort, ucs)
97
+ RUN cd /opt/software \
98
+ && wget https://github.com/vmikk/seqhasher/releases/download/1.1.1/seqhasher \
99
+ && chmod +x seqhasher \
100
+ && mv seqhasher ${CONDA_PREFIX}/bin/ \
101
+ && wget https://github.com/vmikk/phredsort/releases/download/1.3.0/phredsort \
102
+ && chmod +x phredsort \
103
+ && mv phredsort ${CONDA_PREFIX}/bin/ \
104
+ && wget https://github.com/vmikk/ucs/releases/download/0.8.0/ucs \
105
+ && chmod +x ucs \
106
+ && mv ucs ${CONDA_PREFIX}/bin/
107
+
84
108
## fqgrep
85
109
RUN git clone --depth 1 https://github.com/indraniel/fqgrep \
86
110
&& cd fqgrep \
@@ -90,21 +114,45 @@ RUN git clone --depth 1 https://github.com/indraniel/fqgrep \
90
114
&& rm -r fqgrep
91
115
92
116
## rush
93
- RUN wget https://github.com/shenwei356/rush/releases/download/v0.5.0 /rush_linux_amd64.tar.gz \
117
+ RUN wget https://github.com/shenwei356/rush/releases/download/v0.5.4 /rush_linux_amd64.tar.gz \
94
118
&& tar -xzf rush_linux_amd64.tar.gz \
95
119
&& mv rush ${CONDA_PREFIX}/bin/ \
96
120
&& rm rush_linux_amd64.tar.gz
97
121
122
+ ## brename
123
+ RUN wget https://github.com/shenwei356/brename/releases/download/v2.14.0/brename_linux_amd64.tar.gz \
124
+ && tar -xzf brename_linux_amd64.tar.gz \
125
+ && mv brename ${conda_prefix}/bin/ \
126
+ && rm brename_linux_amd64.tar.gz
127
+
98
128
## MUMU
99
- RUN git clone https://github.com/frederic-mahe/mumu.git \
129
+ RUN git clone --depth 1 https://github.com/frederic-mahe/mumu.git \
100
130
&& cd ./mumu/ \
101
131
&& make && make check && make install \
102
132
&& mv mumu ${CONDA_PREFIX}/bin/ \
103
133
&& cd .. \
104
134
&& rm -r mumu
105
135
106
136
## Rust tools (from the Cargo-based stage)
107
- COPY --from=RUST /usr/local/cargo/bin/runiq /opt/software/conda/bin/runiq
108
- COPY --from=RUST /usr/local/cargo/bin/sd /opt/software/conda/bin/sd
137
+ COPY --from=rust /usr/local/cargo/bin/runiq /opt/software/conda/bin/runiq
138
+ COPY --from=rust /usr/local/cargo/bin/sd /opt/software/conda/bin/sd
139
+ COPY --from=nextflow /usr/local/bin/nextflow /usr/local/bin/nextflow
140
+
141
+ ## Update ITSx databases
142
+ RUN cd /opt/software \
143
+ && git clone --depth 1 https://github.com/USDA-ARS-GBRU/ITS_HMMs/ \
144
+ && find ITS_HMMs/ITSx_db/HMMs/ -name "*.hmm" | grep -v "N.hmm" \
145
+ | ${CONDA_PREFIX}/bin/parallel -j1 "${CONDA_PREFIX}/bin/hmmpress {}" \
146
+ && rm ${CONDA_PREFIX}/bin/ITSx_db/HMMs/* \
147
+ && mv ITS_HMMs/ITSx_db/HMMs/* ${CONDA_PREFIX}/bin/ITSx_db/HMMs/ \
148
+ && rm -r ITS_HMMs \
149
+ && sed -i '/#push(@profileSet,"Y")/s/#//' ${CONDA_PREFIX}/bin/ITSx
150
+
151
+ ## Install DuckDB
152
+ RUN cd /opt/software \
153
+ && curl -L https://github.com/duckdb/duckdb/releases/download/v1.2.0/duckdb_cli-linux-amd64.zip -o duckdb_cli-linux-amd64.zip \
154
+ && unzip duckdb_cli-linux-amd64.zip -d ${CONDA_PREFIX}/bin/ \
155
+ && rm duckdb_cli-linux-amd64.zip
156
+
109
157
110
158
WORKDIR /opt/software
0 commit comments