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

Paralogues plugin: install ensembl-compara #1745

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
3 changes: 2 additions & 1 deletion INSTALL.pl
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ BEGIN
{ name => 'ensembl', path => ' ', test_pm => 'Bio::EnsEMBL::Registry' },
{ name => 'ensembl-variation', path => 'Variation', test_pm => 'Bio::EnsEMBL::Variation::Variation' },
{ name => 'ensembl-funcgen', path => 'Funcgen', test_pm => 'Bio::EnsEMBL::Funcgen::RegulatoryFeature' },
{ name => 'ensembl-compara', path => 'Compara', test_pm => 'Bio::EnsEMBL::Compara::Homology' },
{ name => 'ensembl-io', path => 'IO,Utils', test_pm => 'Bio::EnsEMBL::IO::Parser' },
);
my $ensembl_url_tail = '/archive/';
Expand Down Expand Up @@ -636,7 +637,7 @@ ()
}

elsif($total > 0) {
$message = "It looks like you already have the following API modules installed:\n\n".(join "\n", grep {$has_api->{$_}} keys %$has_api)."\n\nThe VEP requires the ensembl, ensembl-io, ensembl-variation and ensembl-funcgen modules";
$message = "It looks like you already have the following API modules installed:\n\n".(join "\n", grep {$has_api->{$_}} keys %$has_api)."\n\nEnsembl VEP requires the ensembl, ensembl-io, ensembl-variation, ensembl-compara and ensembl-funcgen modules";
}

if($AUTO =~ /a/ || !defined($message)) {
Expand Down
56 changes: 28 additions & 28 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ARG BRANCH=main
###################################################
# Stage 1 - docker container to build ensembl-vep #
###################################################
FROM ubuntu:22.04 as builder
FROM ubuntu:22.04 AS builder

# Update aptitude and install some required packages
# a lot of them are required for Bio::DB::BigFile
Expand All @@ -21,23 +21,24 @@ RUN apt-get update && apt-get -y install \
rm -rf /var/lib/apt/lists/*

# Setup VEP environment
ENV OPT /opt/vep
ENV OPT_SRC $OPT/src
ENV HTSLIB_DIR $OPT_SRC/htslib
ENV OPT=/opt/vep
ENV OPT_SRC=$OPT/src
ENV HTSLIB_DIR=$OPT_SRC/htslib
ARG BRANCH

# Working directory
WORKDIR $OPT_SRC

# Add ensembl-vep files from current context
ADD . ensembl-vep

# Clone/download repositories/libraries
RUN if [ "$BRANCH" = "main" ]; \
then export BRANCH_OPT=""; \
else export BRANCH_OPT="-b $BRANCH"; \
fi && \
# Get ensembl cpanfile in order to get the list of the required Perl libraries
wget -q "https://raw.githubusercontent.com/Ensembl/ensembl/$BRANCH/cpanfile" -O "ensembl_cpanfile" && \
# Clone ensembl-vep git repository
git clone $BRANCH_OPT --depth 1 https://github.com/Ensembl/ensembl-vep.git && chmod u+x ensembl-vep/*.pl && \
# Clone ensembl-variation git repository and compile C code
git clone $BRANCH_OPT --depth 1 https://github.com/Ensembl/ensembl-variation.git && \
mkdir var_c_code && \
Expand All @@ -56,7 +57,6 @@ RUN if [ "$BRANCH" = "main" ]; \
## A lot of cleanup on the imported libraries, in order to reduce the docker image ##
rm -rf Bio-HTS/.??* Bio-HTS/Changes Bio-HTS/DISCLAIMER Bio-HTS/MANIFEST* Bio-HTS/README Bio-HTS/scripts Bio-HTS/t Bio-HTS/travisci \
bioperl-ext/.??* bioperl-ext/Bio/SeqIO bioperl-ext/Bio/Tools bioperl-ext/Makefile.PL bioperl-ext/README* bioperl-ext/t bioperl-ext/examples \
ensembl-vep/.??* ensembl-vep/docker \
ensembl-xs/.??* ensembl-xs/TODO ensembl-xs/Changes ensembl-xs/INSTALL ensembl-xs/MANIFEST ensembl-xs/README ensembl-xs/t ensembl-xs/travisci \
htslib/.??* htslib/INSTALL htslib/NEWS htslib/README* htslib/test && \
# Only keep needed kent-335_base libraries for VEP - used by Bio::DB::BigFile (bigWig parsing)
Expand Down Expand Up @@ -108,15 +108,15 @@ RUN apt-get update && apt-get -y install \
rm -rf /var/lib/apt/lists/*

# Setup VEP environment
ENV OPT /opt/vep
ENV OPT_SRC $OPT/src
ENV PERL5LIB_TMP $PERL5LIB:$OPT_SRC/ensembl-vep:$OPT_SRC/ensembl-vep/modules
ENV PERL5LIB $PERL5LIB_TMP:$OPT_SRC/bioperl-live
ENV KENT_SRC $OPT/src/kent-335_base/src
ENV HTSLIB_DIR $OPT_SRC/htslib
ENV DEPS $OPT_SRC
ENV PATH $OPT_SRC/ensembl-vep:$OPT_SRC/var_c_code:$PATH
ENV LANG_VAR en_US.UTF-8
ENV OPT=/opt/vep
ENV OPT_SRC=$OPT/src
ENV PERL5LIB_TMP=$PERL5LIB:$OPT_SRC/ensembl-vep:$OPT_SRC/ensembl-vep/modules:/plugins
ENV PERL5LIB=$PERL5LIB_TMP:$OPT_SRC/bioperl-live
ENV KENT_SRC=$OPT/src/kent-335_base/src
ENV HTSLIB_DIR=$OPT_SRC/htslib
ENV DEPS=$OPT_SRC
ENV PATH=$OPT_SRC/ensembl-vep:$OPT_SRC/var_c_code:$PATH
ENV LANG_VAR=en_US.UTF-8
ARG BRANCH

# Create vep user
Expand Down Expand Up @@ -160,23 +160,23 @@ RUN export MACHTYPE=$(uname -m) &&\
# Remove CPAN cache
rm -rf /root/.cpanm

ENV LC_ALL $LANG_VAR
ENV LANG $LANG_VAR
ENV LC_ALL=$LANG_VAR
ENV LANG=$LANG_VAR

# Switch back to vep user
USER vep
ENV PERL5LIB $PERL5LIB_TMP
ENV PERL5LIB=$PERL5LIB_TMP

# Setup Docker environment for when users run VEP and INSTALL.pl in Docker image:
# - skip VEP updates in INSTALL.pl
ENV VEP_NO_UPDATE 1
ENV VEP_NO_UPDATE=1
# - avoid Faidx/HTSLIB installation in INSTALL.pl
ENV VEP_NO_HTSLIB 1
ENV VEP_NO_HTSLIB=1
# - skip plugin installation in INSTALL.pl
ENV VEP_NO_PLUGINS 1
ENV VEP_NO_PLUGINS=1
# - set plugins directory for VEP and INSTALL.pl
ENV VEP_DIR_PLUGINS /plugins
ENV VEP_PLUGINSDIR $VEP_DIR_PLUGINS
ENV VEP_DIR_PLUGINS=/plugins
ENV VEP_PLUGINSDIR=$VEP_DIR_PLUGINS
WORKDIR $VEP_DIR_PLUGINS

# Update bash profile
Expand All @@ -186,12 +186,12 @@ RUN echo >> $OPT/.profile && \
echo export PATH >> $OPT/.profile && \
# Install Ensembl API and plugins
./INSTALL.pl --auto ap --plugins all --pluginsdir $VEP_DIR_PLUGINS --no_update --no_htslib && \
# Remove the ensemb-vep tests and travis
rm -rf t travisci .travis.yml
# Remove ensemb-vep's travisci folder
rm -rf travisci

# Install dependencies for VEP plugins:
USER root
ENV PLUGIN_DEPS "https://raw.githubusercontent.com/Ensembl/VEP_plugins/$BRANCH/config"
ENV PLUGIN_DEPS="https://raw.githubusercontent.com/Ensembl/VEP_plugins/$BRANCH/config"
# - Ubuntu packages
RUN curl -O "$PLUGIN_DEPS/ubuntu-packages.txt" && \
apt-get update && apt-get install -y --no-install-recommends \
Expand Down Expand Up @@ -220,7 +220,7 @@ RUN curl -O ftp://ftp.ccb.jhu.edu/pub/software/genesplicer/GeneSplicer.tar.gz &&
make && \
mv genesplicer .. && \
rm -rf GeneSplicer/*/
ENV PATH $VEP_DIR_PLUGINS/GeneSplicer:$PATH
ENV PATH=$VEP_DIR_PLUGINS/GeneSplicer:$PATH

# Set working directory as symlink to $OPT/.vep (containing VEP cache and data)
USER root
Expand Down
3 changes: 3 additions & 0 deletions docker/Dockerfile.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.*
t
docker