Skip to content

Commit

Permalink
fix: somalier container (#1487)
Browse files Browse the repository at this point in the history
* update somalier and dependecies

* update docs

* fix security hotspot

* restrict redirects

* update docs

* changelog
  • Loading branch information
khurrammaqbool authored Oct 16, 2024
1 parent ed830b1 commit 5e7bb88
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 31 deletions.
2 changes: 1 addition & 1 deletion BALSAMIC/containers/msisensorpro/msisensorpro.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- msisensorpro=1.2.0
- msisensorpro=1.3.0
63 changes: 40 additions & 23 deletions BALSAMIC/containers/somalier/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,58 +1,75 @@
FROM alpine:3.11.5

LABEL base.image="alpine:3.11.5"
LABEL about.home="https://github.com/Clinical-Genomics/BALSAMIC"
LABEL about.documentation="https://balsamic.readthedocs.io/"
LABEL about.license="MIT License (MIT)"
LABEL about.description="Bioinformatic analysis pipeline for somatic mutations in cancer"

ARG nim_version=1.6.6
LABEL base.image="alpine:3.11.5" \
maintainer="Clinical Genomics" \
about.contact="[email protected]" \
software="somalier" \
software.version="0.2.19" \
about.summary="Fast sample-swap and relatedness checks on BAMs/CRAMs/VCFs/GVCFs" \
about.home="https://github.com/brentp/somalier" \
about.documentation="https://github.com/brentp/somalier/wiki" \
about.license="MIT License (MIT)"

ARG nim_version=1.6.20
ENV CFLAGS="-fPIC -O3"
ENV HTTPS_METHOD=noredirect

RUN apk add --no-cache wget git autoconf tar xz xz-dev bzip2-dev curl curl-dev bash libzip-dev cmake openblas-dev build-base
RUN apk upgrade && apk add --no-cache wget git xz bzip2-static musl m4 \
autoconf tar xz-dev bzip2-dev build-base libpthread-stubs libzip-dev gfortran \
openssl-libs-static openblas-static pcre-dev curl llvm-dev curl-static \
bash curl-dev clang-static nghttp2-static zlib-static cmake procps

RUN mkdir -p /usr/local/include && \
git clone --depth 1 https://github.com/ebiggers/libdeflate.git && \
cd libdeflate && cmake -B build && cmake --build build && \
cp /libdeflate/build/libdeflate.a /usr/local/lib && cp /libdeflate/libdeflate.h /usr/local/include && \
git clone -b v1.18 --depth 1 https://github.com/ebiggers/libdeflate.git && \
cd libdeflate && cmake -B build && cmake --build build && cmake --install build && \
ln -s /usr/local/lib64/* /usr/local/lib && \
cd .. && rm -rf libdeflate

RUN cd / && \
wget -q https://nim-lang.org/download/nim-${nim_version}-linux_x64.tar.xz && \
wget --max-redirect=0 -q https://nim-lang.org/download/nim-${nim_version}-linux_x64.tar.xz && \
tar xf nim-${nim_version}-linux_x64.tar.xz && \
echo 'PATH=/nim-${nim_version}/bin:$PATH' >> ~/.bashrc && \
echo 'PATH=/nim-${nim_version}/bin:$PATH' >> ~/.bash_profile && \
echo 'PATH=/nim-${nim_version}/bin:$PATH' >> /etc/environment && \
rm -f nim-${nim_version}-linux_x64.tar.xz

ENV PATH=/nim-${nim_version}/bin/:$PATH
RUN apk add --no-cache cmake openssl-dev && \
wget --max-redirect=0 -q https://libzip.org/download/libzip-1.6.1.tar.gz && \
tar xzvf libzip-1.6.1.tar.gz && \
cd libzip-1.6.1 && \
mkdir build && cd build && \
cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=/usr/local/ ../ && \
make -j4 CFLAGS="-fPIC -O3" install && \
cd ../../ && rm -rf libzip-1.6.1*

RUN cd / && \
git clone --depth 1 -b 1.15 --recursive https://github.com/samtools/htslib && \
ENV PATH=:/root/.nimble/bin:/nim-${nim_version}/bin/:$PATH

RUN git clone --depth 1 -b 1.18 --recursive https://github.com/samtools/htslib && \
cd htslib && autoheader && autoconf && \
./configure --enable-s3 --enable-gcs --enable-libcurl --with-libdeflate && \
make -j4 CFLAGS="-fPIC -O3" install && \
cd ../ && \
git clone --depth 1 -b 1.15 --recursive https://github.com/samtools/bcftools && \
git clone --depth 1 -b 1.18 --recursive https://github.com/samtools/bcftools && \
cd bcftools && autoheader && autoconf && \
./configure --enable-s3 --enable-libcurl --with-libdeflate && \
make -j4 CFLAGS="-fPIC -O3" install && \
cd ../ && rm -rf htslib bcftools

RUN cd / && \
git clone -b v0.2.16 --depth 1 https://github.com/brentp/somalier.git && \
cd somalier && \
nimble install -y nimble && \
/root/.nimble/bin/nimble install -d -y
RUN cd / && git clone -b v0.2.19 --depth 5 https://github.com/brentp/somalier.git && \
nimble install -y [email protected] && \
cd somalier && nimble install -d -y

RUN cd /somalier && \
RUN apk add --no-cache openblas && \
cd /somalier && \
nim c -d:danger -d:nsb_static -d:release -d:openmp -d:blas=openblas -d:lapack=openblas -o:/usr/bin/somalier src/somalier && \
cp scripts/ancestry-labels-1kg.tsv / && \
rm -rf /somalier && somalier --help

ENV somalier_ancestry_labels /ancestry_labels-1kg.tsv
ENV somalier_ancestry_labels=/ancestry_labels-1kg.tsv

RUN rm -rf /var/cache/apk/*

RUN adduser -D defaultuser

USER defaultuser

2 changes: 1 addition & 1 deletion BALSAMIC/containers/somalier/somalier.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- somalier=0.2.16
- somalier=0.2.19
5 changes: 3 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ Fixed:
* MSI table https://github.com/Clinical-Genomics/BALSAMIC/pull/1459
* Pin numpy version in CNVkit container https://github.com/Clinical-Genomics/BALSAMIC/pull/1457
* CNVkit incorrect version in the documentation https://github.com/Clinical-Genomics/BALSAMIC/pull/1457
* MSIsensor-pro container https://github.com/Clinical-Genomics/BALSAMIC/pull/

* MSIsensor-pro container and updated msisensor to version 1.3.0 https://github.com/Clinical-Genomics/BALSAMIC/pull/1486
* Somalier container and updated somalier to version 0.2.19 https://github.com/Clinical-Genomics/BALSAMIC/pull/1487

[15.0.1]
--------

Expand Down
4 changes: 2 additions & 2 deletions docs/bioinfo_softwares.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ msisensor-pro
~~~~~~~~~~~~~
:Source code: `GitHub` `<https://github.com/xjtu-omics/msisensor-pro>`_
:Article: `Bioinformatics` `<https://doi.org/10.1016/j.gpb.2020.02.001>`_
:Version: `1.2.0`
:Version: `1.3.0`

mosdepth
~~~~~~~~
Expand Down Expand Up @@ -128,7 +128,7 @@ somalier
~~~~~~~~
:Source code: `Github` `<https://github.com/brentp/somalier>`_
:Article: `Genome Medicine` `<https://doi.org/10.1186/s13073-020-00761-2>`_
:Version: `0.2.16`
:Version: `0.2.19`

svdb
~~~~
Expand Down
4 changes: 2 additions & 2 deletions tests/test_data/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
"svdb": ["2.8.1"],
"tiddit": ["3.3.2"],
"vardict": ["2019.06.04"],
"somalier": ["0.2.16"],
"somalier": ["0.2.19"],
"delly": ["1.0.3"],
"manta": ["1.6.0"],
"bedtools": ["2.30.0"],
Expand All @@ -227,7 +227,7 @@
"ascatNgs": ["4.5.0"],
"vcf2cytosure": ["0.9.1"],
"cnvpytor": ["1.2.1"],
"msisensorpro": ["1.2.0"]
"msisensorpro": ["1.3.0"]
},
"panel": {
"capture_kit": "tests/test_data/references/panel/panel.bed",
Expand Down

0 comments on commit 5e7bb88

Please sign in to comment.