Skip to content

Commit

Permalink
Merge pull request #18 from eipm/BIO-1104-bioinformatics-add-pigz-to-…
Browse files Browse the repository at this point in the history
…the-image

Added pigz, optimized multi-stage, updated README
  • Loading branch information
asboner authored Dec 6, 2022
2 parents ab2df1f + d8cb88d commit 2dcbe28
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 110 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,32 +84,4 @@ jobs:
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
- name: Login to CGEN DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.CGEN_DOCKER_HUB_USERNAME }}
password: ${{ secrets.CGEN_DOCKER_HUB_TOKEN }}

- name: Push image to CGEN Docker Hub
run: |
IMAGE_ID=cgen/$IMAGE_NAME
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# Use Docker `latest` tag convention
[ "$VERSION" == "main" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
88 changes: 12 additions & 76 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,12 @@ RUN apt-get update \
&& apt-get upgrade -y --fix-missing \
&& apt-get install build-essential -y \
&& apt-get install -y \
vim \
emacs \
bedtools \
bcftools \
vcftools \
bwa \
libncurses5-dev \
libbz2-dev \
liblzma-dev \
python-htseq \
&& rm -rf /var/lib/apt/lists/*

#===========================#
# Install BEDTOOLS #
#===========================#
# ENV BEDTOOLS_VERSION 2.27.1
# ENV bedtools_dir /${PROGRAMS}/bedtools-${BEDTOOLS_VERSION}
# RUN wget -O bedtools-${BEDTOOLS_VERSION}.tar.gz https://github.com/arq5x/bedtools2/releases/download/v${BEDTOOLS_VERSION}/bedtools-${BEDTOOLS_VERSION}.tar.gz \
# && tar zxf bedtools-${BEDTOOLS_VERSION}.tar.gz -C ${PROGRAMS} \
# && rm bedtools-${BEDTOOLS_VERSION}.tar.gz \
# && cd ${PROGRAMS}/bedtools2 \
# && make \
# && make install
#===========================#
# Install SAMTOOLS & HTSLIB #
#===========================#
Expand All @@ -59,39 +42,6 @@ RUN wget -O samtools-${SAMTOOLS_VERSION}.tar.bz2 https://github.com/samtools/sam
&& cd htslib-${HTSLIB_VERSION} \
&& make \
&& make install
# #===========================#
# # Install BCFTOOLS #
# #===========================#
# ENV BCFTOOLS_VERSION 1.8
# ENV bcftools_dir /${PROGRAMS}/bcftools-${BCFTOOLS_VERSION}
# RUN wget -O bcftools-${BCFTOOLS_VERSION}.tar.bz2 https://github.com/samtools/bcftools/releases/download/${BCFTOOLS_VERSION}/bcftools-${BCFTOOLS_VERSION}.tar.bz2 \
# && tar jxf bcftools-${BCFTOOLS_VERSION}.tar.bz2 -C ${PROGRAMS} \
# && rm bcftools-${BCFTOOLS_VERSION}.tar.bz2 \
# && cd ${bcftools_dir} \
# && make \
# && make install
#===========================#
# Install VCFTOOLS #
#===========================#
# ENV VCFTOOLS_VERSION 0.1.15
# ENV vcftools_dir ${PROGRAMS}/vcftools-${VCFTOOLS_VERSION}
# RUN wget -O vcftools-${VCFTOOLS_VERSION}.tar.gz https://github.com/vcftools/vcftools/releases/download/v${VCFTOOLS_VERSION}/vcftools-${VCFTOOLS_VERSION}.tar.gz \
# && tar zxf vcftools-${VCFTOOLS_VERSION}.tar.gz -C ${PROGRAMS} \
# && rm vcftools-${VCFTOOLS_VERSION}.tar.gz \
# && cd ${vcftools_dir} \
# && ./configure --bindir=/usr/local/bin \
# && make \
# && make install
#===========================#
# Install BWA #
#===========================#
# ENV BWA_VERSION 0.7.17
# ENV bwa_dir /${PROGRAMS}/bwa-${BWA_VERSION}
# RUN wget -O bwa-${BWA_VERSION}.tar.bz2 http://sourceforge.net/projects/bio-bwa/files/bwa-${BWA_VERSION}.tar.bz2 \
# && tar jxf bwa-${BWA_VERSION}.tar.bz2 -C /${PROGRAMS} \
# && rm bwa-${BWA_VERSION}.tar.bz2 \
# && cd ${bwa_dir} \
# && make -f Makefile

#===========================#
# Install PINDEL #
Expand All @@ -103,21 +53,7 @@ RUN cd ${PROGRAMS} \
&& git fetch origin pull/64/head:fix \
&& git checkout fix \
&& ./INSTALL ${htslib_dir}

## PINDEL version: version 0.2.5b6, 20150915 (downloaded Nov 10 2015)
# https://github.com/genome/pindel/archive/v${PINDEL_VERSION}.tar.gz
# ENV PINDEL_VERSION 0.2.5b6
# ENV pindel_dir /${PROGRAMS}/pindel
# RUN wget -O pindel-master.zip https://github.com/genome/pindel/archive/master.zip \
# && unzip pindel-master.zip \
# && rm pindel-master.zip \
# && mv pindel-master pindel \
# && cd pindel \
# && ./INSTALL ${htslib_dir}/htslib-${HTSLIB_VERSION}
# && ./INSTALL /${PROGRAMS}/samtools-${SAMTOOLS_VERSION}/htslib-${HTSLIB_VERSION}
# RUN ln -s ${bwa_dir}/bwa /usr/local/bin/bwa \
# && ln -s ${pindel_dir}/pindel /usr/local/bin/pindel
RUN ln -s ${pindel_dir}/pindel /usr/local/bin/pindel
RUN cp ${pindel_dir}/pindel /usr/local/bin/pindel

#===========================#
# Install STAR #
Expand All @@ -128,8 +64,8 @@ RUN wget -O STAR-${STAR_VERSION}.tar.gz https://github.com/alexdobin/STAR/archiv
&& tar xzf STAR-${STAR_VERSION}.tar.gz -C ${PROGRAMS} \
&& rm STAR-${STAR_VERSION}.tar.gz \
&& cd ${star_dir}/source \
&& make STAR
RUN ln -s ${star_dir}/source/STAR /usr/local/bin/
&& make STAR \
&& cp STAR /usr/local/bin/
RUN apt-get upgrade -y && apt-get -y clean all

## Multi-stage build
Expand All @@ -144,17 +80,17 @@ ENV APP_NAME="bioinformatics" \

RUN apt-get update \
&& apt-get upgrade -y --fix-missing \
&& apt-get install -y \
vim \
emacs \
bedtools \
bcftools \
vcftools \
bwa \
pigz \
&& apt-get -y clean all

COPY --from=rstudio /usr/local /usr/local
COPY --from=rstudio /usr/lib /usr/lib
COPY --from=rstudio /usr/lib64 /usr/lib64
RUN true
COPY --from=rstudio /usr/bin /usr/bin
RUN true
COPY --from=rstudio /${PROGRAMS}/STAR-${STAR_VERSION} /${PROGRAMS}/STAR-${STAR_VERSION}
RUN true
COPY --from=rstudio /${PROGRAMS}/pindel/pindel /${PROGRAMS}/pindel/pindel
COPY --from=rstudio /usr/local/bin /usr/local/bin
RUN true
COPY --from=rstudio /${PROGRAMS}/samtools-${SAMTOOLS_VERSION} /${PROGRAMS}/samtools-${SAMTOOLS_VERSION}

Expand Down
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@

This application provides some of the basic bioinformatics tools for development, debugging, and troubleshooting applications.

[![Actions Status](https://github.com/eipm/bioinformatics/workflows/Docker/badge.svg)](https://github.com/eipm/bioinformatics/actions) [![Github](https://img.shields.io/badge/github-1.3.1-green?style=flat&logo=github)](https://github.com/eipm/bioinformatics) [![EIPM Docker Hub](https://img.shields.io/badge/EIPM%20docker%20hub-1.3.1-blue?style=flat&logo=docker)](https://hub.docker.com/repository/docker/eipm/bioinformatics) [![CGEN Docker Hub](https://img.shields.io/badge/CGEN%20docker%20hub-1.3.1-blue?style=flat&logo=docker)](https://hub.docker.com/repository/docker/cgen/bioinformatics) [![GitHub Container Registry](https://img.shields.io/badge/GitHub%20Container%20Registry-1.3.1-blue?style=flat&logo=docker)](https://github.com/orgs/eipm/packages/container/package/bioinformatics)
[![Actions Status](https://github.com/eipm/bioinformatics/workflows/Docker/badge.svg)](https://github.com/eipm/bioinformatics/actions) [![Github](https://img.shields.io/badge/github-1.3.1-green?style=flat&logo=github)](https://github.com/eipm/bioinformatics) [![EIPM Docker Hub](https://img.shields.io/badge/EIPM%20docker%20hub-1.3.1-blue?style=flat&logo=docker)](https://hub.docker.com/repository/docker/eipm/bioinformatics) [![GitHub Container Registry](https://img.shields.io/badge/GitHub%20Container%20Registry-1.3.1-blue?style=flat&logo=docker)](https://github.com/orgs/eipm/packages/container/package/bioinformatics)

It includes:

* R 4.0.2
* bedtools (installed from distro with apt install: current version 2.27.1)
* samtools & htslib 1.8
* bcftools (installed from distro with apt install: current 1.10.2-3 using htslib 1.10.2-3)
* R 4.2.2
* bedtools (installed from distro with apt install: current version v2.30.0)
* bcftools (installed from distro with apt install: current 1.13 (using htslib 1.13+ds)
* vcftools (installed from distro with apt install: current 0.1.16)
* bwa (installed from distro with apt install: current 0.7.17-r1188)
* samtools (1.9 (using htslib 1.9))
* pindel (latest:0.2.5b9, 20160729)
* STAR (2.7.6a)

The installed tools are the latest available as of Aug 18, 2020.
The installed tools are the latest available as of Dec 5, 2022.

**Note**: *pindel* includes a fix from a non-merged branch (see [Dockerfile](./Dockerfile)).

Expand Down Expand Up @@ -49,3 +50,6 @@ docker run --rm -it --name bioinfo -u $(id -u):$(id -g) -v /path/to/local/folder
### Transform BAM

This image also include an utility called `transformBAM.sh` that will transform a BAM file by replacing IDs in the header. It will warn if changes need to occur in the content of the BAM file, e.g. the RG group. To use it, simply type `transformBAM.sh` and the usage will be displayed.

### Combine pindel VCFs
This utility `combine_pindel_vcfs.sh` takes multiple pindel results and merge them [TBDs]

0 comments on commit 2dcbe28

Please sign in to comment.