Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding clair3 version 1.0.10 #1035

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ To learn more about the docker pull rate limits and the open source software pro
| [Circlator](https://hub.docker.com/r/staphb/circlator) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/circlator)](https://hub.docker.com/r/staphb/circlator) | <ul><li>1.5.6</li><li>1.5.5</li></ul> | https://github.com/sanger-pathogens/circlator |
| [Circos](https://hub.docker.com/r/staphb/circos) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/circos)](https://hub.docker.com/r/staphb/circos) | <ul><li>[0.69-9](./circos/0.69.9/)</li></ul> | https://circos.ca/ |
| [CirculoCov](https://hub.docker.com/r/staphb/circulocov) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/circulocov)](https://hub.docker.com/r/staphb/circulocov) | <ul><li>[0.1.20240104](./circulocov/0.1.20240104/)</li></ul> | https://github.com/erinyoung/CirculoCov |
| [Clair3](https://hub.docker.com/r/staphb/clair3) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/clair3)](https://hub.docker.com/r/staphb/clair3) | <ul><li>[1.0.9](./clair3/1.0.9/)</li></ul> | https://github.com/HKU-BAL/Clair3 |
| [Clair3](https://hub.docker.com/r/staphb/clair3) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/clair3)](https://hub.docker.com/r/staphb/clair3) | <ul><li>[1.0.9](./clair3/1.0.9/)</li><li>[1.0.10](./clair3/1.0.10/)</li></ul> | https://github.com/HKU-BAL/Clair3 |
| [Clustalo](https://hub.docker.com/r/staphb/clustalo) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/clustalo)](https://hub.docker.com/r/staphb/clustalo) | <ul><li>1.2.4</li></ul> | http://www.clustal.org/omega/ |
| [colorid](https://hub.docker.com/r/staphb/colorid) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/colorid)](https://hub.docker.com/r/staphb/colorid) | <ul><li>0.1.4.3</li></ul> | https://github.com/hcdenbakker/colorid |
| [cutshaw-report-env](https://hub.docker.com/r/staphb/cutshaw-report-env) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/cutshaw-report-env)](https://hub.docker.com/r/staphb/cutshaw-report-env) | <ul><li>1.0.0</li></ul> | https://github.com/VADGS/CutShaw |
Expand Down
122 changes: 122 additions & 0 deletions clair3/1.0.10/Dockerfile
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
32 changes: 32 additions & 0 deletions clair3/1.0.10/README.md
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
```