Skip to content

Commit

Permalink
Merge branch 'release/1.17.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ra11 committed Jul 27, 2020
2 parents 1f8ed22 + b38710c commit 08f041c
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 94 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGES

## 1.17.0

* Updated Dockerfile to use PCAP-core 5.2.2
* Updated setup.sh script to remove redundant logic
* Updated CaVEMan core to [1.15.0](https://github.com/cancerit/CaVEMan/releases/tag/1.15.0)

## 1.16.0

* Pulls in cgpCaVEManPostProcessing 1.9.0
Expand Down
33 changes: 20 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
FROM quay.io/wtsicgp/pcap-core:4.4.0 as builder
FROM quay.io/wtsicgp/pcap-core:5.2.2 as builder

USER root

# ALL tool versions used by opt-build.sh
ENV VER_VCFTOOLS="0.1.16"
ENV VER_CGPVCF="v2.2.1"
ENV VER_CAVEMAN="1.14.1"
ENV VER_CAVEMAN="1.15.0"
ENV VER_BEDTOOLS="2.27.1"
ENV VER_CGPCAVEPOSTPROC="1.9.0"

RUN apt-get -yq update
RUN apt-get install -yq --no-install-recommends \
locales \
g++ \
make \
gcc \
pkg-config \
python \
zlib1g-dev
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 pkg-config
RUN apt-get install -yq --no-install-recommends python
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 liblzma-dev
RUN apt-get install -yq --no-install-recommends libcurl4-openssl-dev


RUN locale-gen en_US.UTF-8
RUN update-locale LANG=en_US.UTF-8
Expand All @@ -38,16 +41,16 @@ RUN bash build/opt-build.sh $OPT
COPY . .
RUN bash build/opt-build-local.sh $OPT

FROM ubuntu:16.04
FROM ubuntu:20.04

LABEL maintainer="[email protected]" \
uk.ac.sanger.cgp="Cancer, Ageing and Somatic Mutation, Wellcome Trust Sanger Institute" \
version="1.16.0" \
version="1.17.0" \
description="cgpCaVEManWrapper docker"


RUN apt-get -yq update
RUN apt-get install -yq --no-install-recommends \
apt-transport-https \
locales \
curl \
ca-certificates \
Expand All @@ -59,6 +62,10 @@ zlib1g \
liblzma5 \
libncurses5 \
p11-kit \
libcurl3-gnutls \
libcurl4 \
moreutils \
google-perftools \
unattended-upgrades && \
unattended-upgrade -d -v && \
apt-get remove -yq unattended-upgrades && \
Expand Down
Binary file modified docs.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion lib/Sanger/CGP/Caveman.pm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ package Sanger::CGP::Caveman;
use strict;
use Const::Fast qw(const);

our $VERSION = '1.16.0';
our $VERSION = '1.17.0';

1;
121 changes: 41 additions & 80 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,115 +21,74 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
##########LICENCE##########

CAVEMAN_CORE="https://github.com/cancerit/CaVEMan/archive/1.14.1.tar.gz"

get_distro () {
# ALL tool versions used by opt-build.sh
# need to keep in sync with Dockerfile
export VER_VCFTOOLS="0.1.16"
export VER_CGPVCF="v2.2.1"
export VER_CAVEMAN="1.15.0"
export VER_BEDTOOLS="2.27.1"
export VER_CGPCAVEPOSTPROC="1.9.0"

get_file () {
# output, source
if hash curl 2>/dev/null; then
curl -sS -o $1.tar.gz -L $2
curl -sS -o $1 -L $2
else
wget -nv -O $1.tar.gz $2
wget -nv -O $1 $2
fi
mkdir -p $1
tar --strip-components 1 -C $1 -zxf $1.tar.gz
}

if [ ! -z ${CAVE_C_REMOTE_TAR+x} ] ; then
CAVEMAN_CORE=$CAVE_C_REMOTE_TAR
fi

if [ "$#" -ne "1" ] ; then
echo "Please provide an installation path such as /opt/ICGC"
exit 0
if [[ ($# -ne 1 && $# -ne 2) ]] ; then
echo "Please provide an installation path and optionally perl lib paths to allow, e.g."
echo " ./setup.sh /opt/myBundle"
echo "OR all elements versioned:"
echo " ./setup.sh /opt/cgpVcf-X.X.X /opt/PCAP-X.X.X/lib/perl:/some/other/lib/perl..."
exit 1
fi

CPU=`cat /proc/cpuinfo | egrep "^processor" | wc -l`
echo "Max compilation CPUs set to $CPU"

INST_PATH=$1

if [[ $# -eq 2 ]] ; then
CGP_PERLLIBS=$2
fi

# get current directory
INIT_DIR=`pwd`

set -e

# cleanup inst_path
mkdir -p $INST_PATH/bin
cd $INST_PATH
INST_PATH=`pwd`
cd $INIT_DIR

# make sure that build is self contained
unset PERL5LIB
ARCHNAME=`perl -e 'use Config; print $Config{archname};'`
PERLROOT=$INST_PATH/lib/perl5
export PERL5LIB="$PERLROOT"

#create a location to build dependencies
SETUP_DIR=$INIT_DIR/install_tmp
mkdir -p $SETUP_DIR


# log information about this system
echo '============== System information ===='
set -x
lsb_release -a
uname -a
sw_vers
system_profiler
grep MemTotal /proc/meminfo
set +x
echo

CHK=`perl -le 'eval "require $ARGV[0]" and print $ARGV[0]->VERSION' PCAP`
if [[ "x$CHK" == "x" ]] ; then
echo "PREREQUISITE: Please install PCAP-core before proceeding: https://github.com/ICGC-TCGA-PanCancer/PCAP-core/releases"
exit 1;
fi


if [ ! -e $PERLROOT/Sanger/CGP/CavemanPostProcessor.pm ]; then
echo "PREREQUISITE: Please install cgpCaVEManPostProcessing before proceeding: https://github.com/cancerit/cgpCaVEManPostProcessing/releases"
exit 1;
fi


echo -n "Building CaVEMan ..."
if [ -e $SETUP_DIR/caveman.success ]; then
echo -n " previously installed ...";
# allows user to knowingly specify other PERL5LIB areas.
if [ -z ${CGP_PERLLIBS+x} ]; then
PERL5LIB="$PERLROOT"
else
cd $SETUP_DIR
set -xe
if [ ! -e caveman ]; then
get_distro "caveman" $CAVEMAN_CORE
fi
cd caveman
./setup.sh $INST_PATH
cp scripts/mergeCavemanResults $INST_PATH/bin/.
chmod a+x $INST_PATH/bin/mergeCavemanResults
touch $SETUP_DIR/caveman.success
PERL5LIB="$PERLROOT:$CGP_PERLLIBS"
fi

#add bin path for PCAP install tests
export PATH="$INST_PATH/bin:$PATH"
export PERL5LIB=$PERL5LIB

cd $INIT_DIR
#add bin path for install tests
export PATH=$INST_PATH/bin:$PATH

echo -n "Installing Perl prerequisites ..."
if ! ( perl -MExtUtils::MakeMaker -e 1 >/dev/null 2>&1); then
echo
echo "WARNING: Your Perl installation does not seem to include a complete set of core modules. Attempting to cope with this, but if installation fails please make sure that at least ExtUtils::MakeMaker is installed. For most users, the best way to do this is to use your system's package manager: apt, yum, fink, homebrew, or similar."
fi
set -x
perl $INIT_DIR/bin/cpanm -v --mirror http://cpan.metacpan.org --notest -l $INST_PATH/ --installdeps . < /dev/null
set +x
#create a location to build dependencies
SETUP_DIR=$INIT_DIR/install_tmp
mkdir -p $SETUP_DIR

echo -n "Installing cgpCaVEManWrapper ..."
cd $INIT_DIR
perl Makefile.PL INSTALL_BASE=$INST_PATH
make
make test
make install
#install cpanm
get_file $SETUP_DIR/cpanm https://cpanmin.us/
perl $SETUP_DIR/cpanm -l $INST_PATH App::cpanminus

# cleanup all junk
rm -rf $SETUP_DIR
bash build/opt-build.sh $INST_PATH
bash build/opt-build-local.sh $INST_PATH

echo
echo
Expand All @@ -138,3 +97,5 @@ echo " $INST_PATH/bin"
echo "Please add the following to beginning of PERL5LIB:"
echo " $PERLROOT"
echo

exit 0

0 comments on commit 08f041c

Please sign in to comment.