diff --git a/.github/workflows/docker_build_push.yml b/.github/workflows/docker_build_push.yml index 87ebd3f9a..c94d28b2b 100644 --- a/.github/workflows/docker_build_push.yml +++ b/.github/workflows/docker_build_push.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: true matrix: - container-name: [align_qc, annotate, coverage_qc, varcall_cnvkit, varcall_py27, varcall_py3, balsamic, delly, vcf2cytosure, cnvpytor, somalier] + container-name: [align_qc, annotate, coverage_qc, varcall_cnvkit, varcall_py27, varcall_py3, balsamic, delly, vcf2cytosure, cnvpytor, somalier, ascatNgs] steps: - name: Git checkout id: git_checkout diff --git a/.github/workflows/docker_build_push_release.yml b/.github/workflows/docker_build_push_release.yml index caef83dd7..59c9dc7af 100644 --- a/.github/workflows/docker_build_push_release.yml +++ b/.github/workflows/docker_build_push_release.yml @@ -10,7 +10,7 @@ jobs: strategy: fail-fast: true matrix: - container-name: [align_qc, annotate, coverage_qc, varcall_cnvkit, varcall_py27, varcall_py3, balsamic, delly, vcf2cytosure, cnvpytor, somalier] + container-name: [align_qc, annotate, coverage_qc, varcall_cnvkit, varcall_py27, varcall_py3, balsamic, delly, vcf2cytosure, cnvpytor, somalier, ascatNgs] steps: - name: Git checkout id: git_checkout diff --git a/.github/workflows/docker_build_push_release_submodules.yml b/.github/workflows/docker_build_push_release_submodules.yml deleted file mode 100644 index 7bf3318f9..000000000 --- a/.github/workflows/docker_build_push_release_submodules.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: build and push container submodule -# Trigger building and testing container only on pull requests -on: - push: - tags: - - "**" - -jobs: - main: - name: Docker image build - runs-on: ubuntu-20.04 - strategy: - fail-fast: false - matrix: - container-name: [ascatNgs] - steps: - - name: Git checkout - id: git_checkout - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Get branch name - id: get_branch_name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})" - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Login to DockerHub - id: docker_login - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - name: Build and push - id: docker_build_and_push - uses: docker/build-push-action@v3 - with: - context: submodules/${{ matrix.container-name }} - push: true - tags: clinicalgenomics/balsamic:release_${{ steps.get_branch_name.outputs.branch }}-${{ matrix.container-name }} - provenance: false diff --git a/.github/workflows/docker_build_push_submodules.yml b/.github/workflows/docker_build_push_submodules.yml deleted file mode 100644 index 16d1ec402..000000000 --- a/.github/workflows/docker_build_push_submodules.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: build test container submodule -# Trigger building and testing container only on pull requests -on: - push: - branches: - - master - - develop -jobs: - main: - name: Docker image build - runs-on: ubuntu-20.04 - strategy: - fail-fast: false - matrix: - container-name: [ascatNgs] - steps: - - name: Git checkout - id: git_checkout - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Get branch name - id: get_branch_name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})" - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Login to DockerHub - id: docker_login - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - name: Build and push - id: docker_build_and_push - uses: docker/build-push-action@v3 - with: - context: submodules/${{ matrix.container-name }} - push: true - tags: clinicalgenomics/balsamic:${{ steps.get_branch_name.outputs.branch }}-${{ matrix.container-name }} - provenance: false diff --git a/.github/workflows/docker_build_test_pull_request.yml b/.github/workflows/docker_build_test_pull_request.yml index 1f6d1a6f9..d6fe68bf8 100644 --- a/.github/workflows/docker_build_test_pull_request.yml +++ b/.github/workflows/docker_build_test_pull_request.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - container-name: [align_qc, annotate, coverage_qc, varcall_cnvkit, varcall_py27, varcall_py3, balsamic, delly, vcf2cytosure, cnvpytor, somalier] + container-name: [align_qc, annotate, coverage_qc, varcall_cnvkit, varcall_py27, varcall_py3, balsamic, delly, vcf2cytosure, cnvpytor, somalier, ascatNgs] steps: - name: Git checkout id: git_checkout diff --git a/.github/workflows/docker_build_test_pull_request_submodules.yml b/.github/workflows/docker_build_test_pull_request_submodules.yml deleted file mode 100644 index 01f22820d..000000000 --- a/.github/workflows/docker_build_test_pull_request_submodules.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: build test container submodule -# Trigger building and testing container only on pull requests -on: - push: - branches-ignore: - - master - - develop - tags-ignore: - - "**" -jobs: - main: - name: Docker image build test - runs-on: ubuntu-20.04 - strategy: - fail-fast: false - matrix: - container-name: [ascatNgs] - steps: - - name: Git checkout - id: git_checkout - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Get branch name - id: get_branch_name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})" - - name: Login to DockerHub - id: docker_login - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - name: Build only - id: docker_build_only - uses: docker/build-push-action@v3 - with: - context: submodules/${{ matrix.container-name }} - push: false - tags: clinicalgenomics/balsamic:${{ steps.get_branch_name.outputs.branch }}-${{ matrix.container-name }} diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 002f077ce..000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "submodules/ascatNgs"] - path = submodules/ascatNgs - url = https://github.com/cancerit/ascatNgs diff --git a/BALSAMIC/containers/ascatNgs/Dockerfile b/BALSAMIC/containers/ascatNgs/Dockerfile new file mode 100644 index 000000000..40f177082 --- /dev/null +++ b/BALSAMIC/containers/ascatNgs/Dockerfile @@ -0,0 +1,183 @@ +FROM quay.io/wtsicgp/pcap-core:5.4.2 AS builder + +USER root + +ENV VER_CGPVCF="v2.2.1" +ENV VER_VCFTOOLS="0.1.16" +ENV VER_ALLELECOUNT="v4.2.1" + +RUN apt-get -yq update +RUN apt-get install -qy --no-install-recommends lsb-release +RUN apt-get install -qy --no-install-recommends gnupg +RUN apt-get install -yq --no-install-recommends dirmngr +RUN apt-get install -yq --no-install-recommends wget +RUN apt-get install -yq --no-install-recommends build-essential +RUN apt-get install -yq --no-install-recommends ca-certificates +RUN apt-get install -yq --no-install-recommends locales +RUN apt-get install -yq --no-install-recommends g++ +RUN apt-get install -yq --no-install-recommends make +RUN apt-get install -yq --no-install-recommends gcc +RUN apt-get install -yq --no-install-recommends git + +ENV DEBIAN_FRONTEND "noninteractive" +RUN apt-get -yq update +RUN apt-get install -yq --no-install-recommends software-properties-common +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 +RUN wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc +RUN add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/" +RUN apt-get -yq update +RUN apt-get install -yq --no-install-recommends locales +RUN apt-get install -yq --no-install-recommends g++ +RUN apt-get install -yq --no-install-recommends make +RUN apt-get install -yq --no-install-recommends gcc +RUN apt-get install -yq --no-install-recommends wget +RUN apt-get install -yq --no-install-recommends pkg-config +RUN apt-get install -yq --no-install-recommends zlib1g-dev +RUN apt-get install -yq --no-install-recommends libbz2-dev +RUN apt-get install -yq --no-install-recommends unzip +RUN apt-get install -yq --no-install-recommends libpng-dev +RUN apt-get install -yq --no-install-recommends tzdata +RUN apt-get install -yq --no-install-recommends libcurl4-openssl-dev +RUN apt-get install -yq --no-install-recommends libxml2-dev +RUN apt-get install -yq --no-install-recommends libgit2-dev +RUN apt-get install -yq --no-install-recommends liblzma-dev +RUN apt-get install -yq --no-install-recommends libssl-dev +RUN apt-get install -yq --no-install-recommends nettle-dev +RUN apt-get install -yq --no-install-recommends time +RUN apt-get install -yq --no-install-recommends libcairo2-dev +RUN apt-get install -yq --no-install-recommends gfortran +RUN apt-get install -yq --no-install-recommends libblas-dev +RUN apt-get install -yq --no-install-recommends libboost-all-dev +RUN apt-get install -yq --no-install-recommends libpstreams-dev +RUN apt-get install -yq --no-install-recommends cpanminus +RUN locale-gen en_US.UTF-8 +RUN update-locale LANG=en_US.UTF-8 + +ENV OPT /opt/wtsi-cgp +ENV PATH $OPT/bin:$PATH +ENV PERL5LIB $OPT/lib/perl5 +ENV LD_LIBRARY_PATH $OPT/lib +ENV LC_ALL en_US.UTF-8 +ENV LANG en_US.UTF-8 +ENV R_LIBS $OPT/R-libs +ENV R_LIBS_USER $R_LIBS +ENV R_PROFILE_USER $OPT/config/Rprofile +RUN mkdir -p $OPT +RUN mkdir $OPT/config/ +RUN mkdir -p $R_LIBS_USER +WORKDIR /R +RUN cd /R && wget --progress=dot:giga -q -nv https://cdn.rstudio.com/r/ubuntu-2004/pkgs/r-4.2.1_1_amd64.deb &&\ + apt-get install --no-install-recommends -f -y ./r-4.2.1_1_amd64.deb &&\ + ln -s /opt/R/4.2.1/bin/R /usr/bin/R &&\ + ln -s /opt/R/4.2.1/bin/Rscript /usr/bin/Rscript &&\ + ln -s /opt/R/4.2.1/lib/R /usr/lib/R +WORKDIR /git +RUN cd /git && git clone --recursive https://github.com/cancerit/ascatNgs.git &&\ + cd ascatNgs &&\ + ./setup.sh $OPT + +USER ubuntu +FROM ubuntu:20.04 + +RUN apt-get -yq update && \ +apt-get install -qy --no-install-recommends \ +lsb-release \ +gnupg \ +dirmngr \ +wget \ +build-essential \ +locales \ +gcc \ +wget \ +pkg-config \ +cpanminus \ +git \ +unattended-upgrades && \ +unattended-upgrade -d -v && \ +apt-get remove -yq unattended-upgrades && \ +apt-get autoremove -yq &&\ +apt-get clean && \ +rm -rf /var/lib/apt/lists/* + +ENV DEBIAN_FRONTEND "noninteractive" +RUN locale-gen en_US.UTF-8 +RUN update-locale LANG=en_US.UTF-8 +RUN apt-get -yq update \ +&& apt-get install -yq --no-install-recommends \ +software-properties-common \ +libreadline6-dev \ +libx11-dev \ +libxt-dev \ +libpng-dev \ +libjpeg-dev \ +libcairo2-dev \ +libcairo2-dev \ +xvfb \ +libbz2-dev \ +libzstd-dev \ +liblzma-dev \ +libcurl4-openssl-dev \ +texinfo \ +texlive \ +texlive-fonts-extra \ +screen \ +libpcre2-dev \ +locales \ +curl \ +wget \ +ca-certificates \ +libperlio-gzip-perl \ +bzip2 \ +psmisc \ +time \ +zlib1g \ +liblzma5 \ +libncurses5 \ +p11-kit \ +libcurl3-gnutls \ +libcurl4 \ +moreutils \ +google-perftools \ +libcairo2 \ +gfortran \ +unattended-upgrades && \ +unattended-upgrade -d -v && \ +apt-get remove -yq unattended-upgrades && \ +apt-get autoremove -yq && \ +apt-get clean && \ +rm -rf /var/lib/apt/lists/* + +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 +RUN wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc +RUN add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/" +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 +RUN locale-gen en_US.UTF-8 +RUN update-locale LANG=en_US.UTF-8 + +ENV OPT /opt/wtsi-cgp +ENV PATH $OPT/bin:$PATH +ENV PERL5LIB $OPT/lib/perl5 +ENV LD_LIBRARY_PATH $OPT/lib +ENV LC_ALL en_US.UTF-8 +ENV LANG en_US.UTF-8 +ENV R_LIBS $OPT/R-libs +ENV R_LIBS_USER $R_LIBS +ENV R_PROFILE_USER $OPT/config/Rprofile + +RUN mkdir -p $OPT +COPY --from=builder $OPT $OPT +COPY --from=builder /opt/R /opt/R +WORKDIR /R +RUN cd /R && wget --progress=dot:giga -q -nv https://cdn.rstudio.com/r/ubuntu-2004/pkgs/r-4.2.1_1_amd64.deb &&\ + apt-get install --no-install-recommends -f -y ./r-4.2.1_1_amd64.deb +RUN ln -s /opt/R/4.2.1/bin/R /usr/bin/R +RUN ln -s /opt/R/4.2.1/bin/Rscript /usr/bin/Rscript +RUN ln -s /opt/R/4.2.1/lib/R /usr/lib/R +RUN rm -rf /R +RUN rm -rf /var/lib/apt/lists/* +RUN adduser --disabled-password --gecos '' ubuntu && chsh -s /bin/bash && mkdir -p /home/ubuntu + +USER ubuntu +WORKDIR /home/ubuntu + +CMD ["/bin/bash"] diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a60a3a766..774843a7a 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -20,7 +20,7 @@ Fixed: * Bump cryptography to v40.0.2 and gsutil to v5.23 https://github.com/Clinical-Genomics/BALSAMIC/pull/1154 * Pytest file saved in balsamic directory https://github.com/Clinical-Genomics/BALSAMIC/pull/1093 * Fix varcall_py3 container bcftools dependency error https://github.com/Clinical-Genomics/BALSAMIC/pull/1097 - +* AscatNgs container https://github.com/Clinical-Genomics/BALSAMIC/pull/1155 [11.2.0] -------- diff --git a/container_tests/ascatNgs/ascatNgs.sh b/container_tests/ascatNgs/ascatNgs.sh new file mode 100644 index 000000000..dafd7d6ee --- /dev/null +++ b/container_tests/ascatNgs/ascatNgs.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Test if commands exist + +valid_commands=( "ascat.pl" "R" ) + +for valid_command in "${valid_commands[@]}" +do + if ! command -v "${valid_command}" &> /dev/null + then + echo "${valid_command} could not be found" + exit 1 + else + echo "${valid_command} command is found and valid" + fi +done + diff --git a/submodules/ascatNgs b/submodules/ascatNgs deleted file mode 160000 index 0d83b28d3..000000000 --- a/submodules/ascatNgs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0d83b28d3837d1d001c1dceefcd20b71aa351225