-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding clair3 version 1.0.10 (#1035)
- Loading branch information
Showing
3 changed files
with
155 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
ARG CLAIR3_VER="1.0.10" | ||
|
||
FROM mambaorg/micromamba:1.5.8 as builder | ||
|
||
ARG CLAIR3_VER | ||
|
||
USER root | ||
|
||
WORKDIR / | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
wget \ | ||
bzip2 \ | ||
make \ | ||
g++ \ | ||
libboost-graph-dev | ||
|
||
RUN micromamba install --name base -c conda-forge -c bioconda \ | ||
python=3.9.0 \ | ||
pypy3.6 \ | ||
tensorflow-cpu=2.8.0 \ | ||
pytables \ | ||
pigz \ | ||
cffi=1.14.4 \ | ||
parallel=20191122 \ | ||
zstd \ | ||
samtools=1.15.1 \ | ||
whatshap=1.7 \ | ||
xz \ | ||
zlib \ | ||
bzip2 \ | ||
automake \ | ||
curl &&\ | ||
micromamba clean -a -y | ||
|
||
ENV PATH="$PATH:/opt/conda/bin/" | ||
|
||
ARG MAMBA_DOCKERFILE_ACTIVATE=1 | ||
|
||
RUN pypy3 -m ensurepip && \ | ||
pypy3 -m pip install mpmath==1.2.1 &&\ | ||
pip install tensorflow-addons | ||
|
||
RUN wget -q https://github.com/HKU-BAL/Clair3/archive/refs/tags/v${CLAIR3_VER}.tar.gz &&\ | ||
tar -xvf v${CLAIR3_VER}.tar.gz &&\ | ||
cd Clair3-${CLAIR3_VER}/preprocess/realign/ &&\ | ||
g++ -std=c++14 -O1 -shared -fPIC -o realigner ssw_cpp.cpp ssw.c realigner.cpp && \ | ||
g++ -std=c++11 -shared -fPIC -o debruijn_graph -O3 debruijn_graph.cpp &&\ | ||
cd ../.. &&\ | ||
make &&\ | ||
mkdir /clair3 &&\ | ||
cp -rv clair3 preprocess postprocess scripts shared /clair3 &&\ | ||
cp clair3.py run_clair3.sh /clair3 &&\ | ||
cp longphase libclair3* /clair3 &&\ | ||
cp LICENSE.md /clair3 | ||
|
||
RUN mkdir /clair3/models &&\ | ||
wget -q http://www.bio8.cs.hku.hk/clair3/clair3_models/clair3_models.tar.gz &&\ | ||
tar --no-same-owner -C /clair3/models -xvf clair3_models.tar.gz | ||
|
||
## App ## | ||
FROM mambaorg/micromamba:1.5.8 as app | ||
|
||
ARG CLAIR3_VER | ||
|
||
USER root | ||
|
||
WORKDIR / | ||
|
||
LABEL base.image="mambaorg/micromamba:1.5.8" | ||
LABEL dockerfile.version="1" | ||
LABEL software="CLAIR3" | ||
LABEL software.version="${CLAIR3_VER}" | ||
LABEL description="Clair3 is a germline small variant caller for long-reads." | ||
LABEL website="https://github.com/HKU-BAL/Clair3" | ||
LABEL license="https://github.com/HKU-BAL/Clair3/blob/main/LICENSE.md" | ||
LABEL maintainer="Kutluhan Incekara" | ||
LABEL maintainer.email="[email protected]" | ||
|
||
RUN apt-get update && apt-get install --no-install-recommends -y\ | ||
procps && \ | ||
apt-get autoclean && rm -rf /var/lib/apt/lists/* | ||
|
||
|
||
RUN micromamba install --name base -c conda-forge -c bioconda \ | ||
python=3.9.0 \ | ||
numpy=1.24.3 \ | ||
pypy3.6 \ | ||
tensorflow-cpu=2.8.0 \ | ||
pytables \ | ||
pigz \ | ||
cffi=1.14.4 \ | ||
parallel=20191122 \ | ||
zstd \ | ||
samtools=1.15.1 \ | ||
whatshap=1.7 &&\ | ||
micromamba clean -a -y &&\ | ||
rm -rf /opt/conda/pkgs/ | ||
|
||
ENV PATH="/opt/conda/bin/:/clair3:${PATH}" \ | ||
LC_ALL=C.UTF-8 | ||
|
||
RUN pypy3 -m ensurepip &&\ | ||
pypy3 -m pip install --no-cache mpmath==1.2.1 &&\ | ||
pip install --no-cache tensorflow-addons | ||
|
||
COPY --from=builder /clair3 /clair3 | ||
|
||
CMD run_clair3.sh | ||
|
||
WORKDIR /data | ||
|
||
## Test ## | ||
FROM app as test | ||
|
||
RUN run_clair3.sh | ||
|
||
RUN apt-get update && apt-get install -y wget | ||
|
||
RUN wget -q https://raw.githubusercontent.com/StaPH-B/docker-builds/master/clair3/1.0.9/ont_quick_test.sh && \ | ||
chmod +x ont_quick_test.sh &&\ | ||
./ont_quick_test.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Clair3 container | ||
|
||
Main tool: [clair3](https://github.com/HKU-BAL/Clair3) | ||
|
||
Code repository: https://github.com/HKU-BAL/Clair3 | ||
|
||
Basic information on how to use this tool: | ||
- executable: run_clair3.sh | ||
- help: -h, --help | ||
- version: -v, --version | ||
- description: <tool does something> | ||
|
||
Additional information: | ||
|
||
This container includes models in `/clair3/models` | ||
|
||
Full documentation: https://github.com/HKU-BAL/Clair3 | ||
|
||
## Example Usage | ||
|
||
```bash | ||
run_clair3.sh \ | ||
--bam_fn=${BAM} \ | ||
--ref_fn=${REF} \ | ||
--threads=${THREADS} \ | ||
--platform="ont" \ ## options: {ont,hifi,ilmn} | ||
--model_path=${MODEL_PREFIX} \ ## absolute model path prefix | ||
--output=${OUTPUT_DIR} ## absolute output path prefix | ||
## pileup output file: ${OUTPUT_DIR}/pileup.vcf.gz | ||
## full-alignment output file: ${OUTPUT_DIR}/full_alignment.vcf.gz | ||
## Clair3 final output file: ${OUTPUT_DIR}/merge_output.vcf.gz | ||
``` |