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

chore: add VEP to dev img + update base img #73

Merged
merged 7 commits into from
Apr 5, 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
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FROM --platform=$BUILDPLATFORM debian:bullseye-slim AS downloaded-deps
SHELL ["/bin/bash", "-c"]

# Install VCF2MAF
# - support VEP v107+ by patching vcf2maf to remove references to removed --af_esp option
# TODO: I don't like /opt as a home for these

WORKDIR /tmp/vcf2maf
Expand All @@ -15,6 +16,7 @@ RUN apt-get update -y && \
mv "vcf2maf-${VCF2MAF_VERSION}" vcf2maf && \
mkdir -p /opt/data && \
cp vcf2maf/*.pl /opt && \
sed -i '/ --af_esp/d' /opt/vcf2maf.pl && \
cp -r vcf2maf/data /opt/data && \
rm -rf vcf2maf

Expand All @@ -30,8 +32,8 @@ RUN curl -L \


# Clone (but don't install yet) Ensembl-VEP
ENV VEP_ENSEMBL_RELEASE_VERSION=111.0
RUN git clone --depth 1 -b "release/${VEP_ENSEMBL_RELEASE_VERSION}" https://github.com/Ensembl/ensembl-vep.git && \
ENV VEP_ENSEMBL_GIT_VERSION=111.0
RUN git clone --depth 1 -b "release/${VEP_ENSEMBL_GIT_VERSION}" https://github.com/Ensembl/ensembl-vep.git && \
chmod u+x ensembl-vep/*.pl

# Clone ensembl-variation git repository
Expand All @@ -47,7 +49,7 @@ RUN curl -L https://github.com/Ensembl/ensembl-xs/archive/2.3.2.zip -o ensembl-x

WORKDIR /

FROM ghcr.io/bento-platform/bento_base_image:python-debian-2024.03.01 AS base-deps
FROM ghcr.io/bento-platform/bento_base_image:python-debian-2024.04.01 AS base-deps

SHELL ["/bin/bash", "-c"]

Expand Down
113 changes: 99 additions & 14 deletions dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,55 @@
FROM ghcr.io/bento-platform/bento_base_image:python-debian-2024.03.01 AS base-deps
FROM --platform=$BUILDPLATFORM debian:bullseye-slim AS downloaded-deps

SHELL ["/bin/bash", "-c"]

# Install VCF2MAF
# - support VEP v107+ by patching vcf2maf to remove references to removed --af_esp option
# TODO: I don't like /opt as a home for these

WORKDIR /tmp/vcf2maf
ENV VCF2MAF_VERSION=1.6.21
RUN apt-get update -y && \
apt-get install -y curl git unzip wget && \
echo "https://github.com/mskcc/vcf2maf/archive/refs/tags/v${VCF2MAF_VERSION}.zip" && \
curl -L "https://github.com/mskcc/vcf2maf/archive/refs/tags/v${VCF2MAF_VERSION}.zip" -o vcf2maf.zip && \
unzip vcf2maf.zip && \
mv "vcf2maf-${VCF2MAF_VERSION}" vcf2maf && \
mkdir -p /opt/data && \
cp vcf2maf/*.pl /opt && \
sed -i '/ --af_esp/d' /opt/vcf2maf.pl && \
cp -r vcf2maf/data /opt/data && \
rm -rf vcf2maf

# Download Cromwell + WOMtool
ENV CROMWELL_VERSION=86
WORKDIR /
RUN curl -L \
https://github.com/broadinstitute/cromwell/releases/download/${CROMWELL_VERSION}/cromwell-${CROMWELL_VERSION}.jar \
-o cromwell.jar && \
curl -L \
https://github.com/broadinstitute/cromwell/releases/download/${CROMWELL_VERSION}/womtool-${CROMWELL_VERSION}.jar \
-o womtool.jar


# Clone (but don't install yet) Ensembl-VEP
ENV VEP_ENSEMBL_GIT_VERSION=111.0
RUN git clone --depth 1 -b "release/${VEP_ENSEMBL_GIT_VERSION}" https://github.com/Ensembl/ensembl-vep.git && \
chmod u+x ensembl-vep/*.pl

# Clone ensembl-variation git repository
WORKDIR /ensembl-vep/
RUN git clone --depth 1 https://github.com/Ensembl/ensembl-variation.git && \
mkdir var_c_code && \
cp ensembl-variation/C_code/*.c ensembl-variation/C_code/Makefile var_c_code/
RUN git clone --depth 1 https://github.com/bioperl/bioperl-ext.git
RUN curl -L https://github.com/Ensembl/ensembl-xs/archive/2.3.2.zip -o ensembl-xs.zip && \
unzip -q ensembl-xs.zip && \
mv ensembl-xs-2.3.2 ensembl-xs && \
rm -rf ensembl-xs.zip

WORKDIR /

FROM ghcr.io/bento-platform/bento_base_image:python-debian-2024.04.01 AS base-deps

LABEL org.opencontainers.image.description="Local development image for Bento WES."
LABEL devcontainer.metadata='[{ \
Expand All @@ -13,25 +64,46 @@ LABEL devcontainer.metadata='[{ \

SHELL ["/bin/bash", "-c"]

WORKDIR /

# Install system packages for HTSLib + SAMtools + curl and jq for workflows
# OpenJDK is for running WOMtool/Cromwell

RUN apt-get update -y && \
apt-get install -y \
samtools \
tabix \
bcftools \
curl \
jq \
openjdk-17-jre \
&& \
rm -rf /var/lib/apt/lists/*

# Install system packages for VEP
# Perl/libdbi-perl/lib*-dev/cpanminus/unzip are for cBioPortal scripts / caches / utilities
RUN apt-get update -y && \
apt-get install -y \
curl \
perl \
libdbd-mysql-perl \
libdbi-perl \
libjson-perl \
libwww-perl \
libperl-dev \
cpanminus \
unzip \
libbz2-dev \
liblzma-dev \
zlib1g-dev \
&& \
rm -rf /var/lib/apt/lists/*

# Then, install dependencies for running the Python server + Python workflow dependencies
COPY container.requirements.txt .
RUN apt-get update -y && \
apt-get install -y samtools tabix bcftools curl jq openjdk-17-jre && \
rm -rf /var/lib/apt/lists/* && \
pip install --no-cache-dir -r /container.requirements.txt && \
RUN pip install --no-cache-dir -r /container.requirements.txt && \
rm /container.requirements.txt

WORKDIR /
ENV CROMWELL_VERSION=86
RUN curl -L \
https://github.com/broadinstitute/cromwell/releases/download/${CROMWELL_VERSION}/cromwell-${CROMWELL_VERSION}.jar \
-o cromwell.jar && \
curl -L \
https://github.com/broadinstitute/cromwell/releases/download/${CROMWELL_VERSION}/womtool-${CROMWELL_VERSION}.jar \
-o womtool.jar

FROM base-deps AS install

# Backwards-compatible with old BentoV2 container layout
Expand All @@ -54,5 +126,18 @@ COPY run.dev.bash .
# Tell the service that we're running a local development container
ENV BENTO_CONTAINER_LOCAL=true

# Copy from other stages last, since it means the stages can be built in parallel

# - Copy VCF2MAF
COPY --from=downloaded-deps /opt /opt

# - Copy Cromwell + WOMtool
COPY --from=downloaded-deps /cromwell.jar /cromwell.jar
COPY --from=downloaded-deps /womtool.jar /womtool.jar

# - Copy Ensembl-VEP
COPY --from=ensemblorg/ensembl-vep:release_111.0 /usr/share/perl/5.34.0/CPAN /opt/vep
COPY --from=ensemblorg/ensembl-vep:release_111.0 /opt/vep /opt/vep

ENTRYPOINT [ "bash", "./entrypoint.bash" ]
CMD [ "bash", "./run.dev.bash" ]
8 changes: 4 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading