-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
269 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/LICENCE | ||
/README.md | ||
/INSTALL.md | ||
/LICENCE | ||
/CHANGES.md | ||
/.gitignore | ||
/.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
FROM ubuntu:16.04 as builder | ||
|
||
USER root | ||
|
||
ARG VER_HTSLIB="1.9" | ||
ARG VER_LIBBW="0.4.2" | ||
|
||
ENV OPT /opt/wtsi-cgp | ||
ENV PATH $OPT/bin:$PATH | ||
ENV LD_LIBRARY_PATH $OPT/lib | ||
ENV LC_ALL C | ||
|
||
RUN apt-get -yq update | ||
RUN apt-get install -yq --no-install-recommends\ | ||
build-essential\ | ||
apt-transport-https\ | ||
curl\ | ||
ca-certificates\ | ||
make\ | ||
bzip2\ | ||
gcc\ | ||
libtasn1-dev\ | ||
libgnutls-dev\ | ||
nettle-dev\ | ||
libgmp-dev\ | ||
libp11-kit-dev\ | ||
zlib1g-dev\ | ||
libbz2-dev\ | ||
liblzma-dev\ | ||
libcurl4-gnutls-dev\ | ||
libncurses5-dev | ||
|
||
RUN mkdir -p $OPT/bin | ||
|
||
WORKDIR /install_tmp | ||
|
||
ADD build/opt-build.sh build/ | ||
RUN bash build/opt-build.sh $OPT | ||
|
||
COPY . . | ||
RUN bash build/opt-build-local.sh $OPT | ||
|
||
FROM ubuntu:16.04 | ||
|
||
LABEL maintainer="[email protected]"\ | ||
uk.ac.sanger.cgp="Cancer, Ageing and Somatic Mutation, Wellcome Sanger Institute" \ | ||
version="1.1.0" \ | ||
description="cgpBigWig" | ||
|
||
ENV OPT /opt/wtsi-cgp | ||
ENV PATH $OPT/bin:$PATH | ||
ENV LD_LIBRARY_PATH $OPT/lib | ||
ENV LC_ALL C | ||
|
||
RUN apt-get -yq update | ||
RUN apt-get install -yq --no-install-recommends \ | ||
apt-transport-https \ | ||
curl \ | ||
ca-certificates \ | ||
bzip2 \ | ||
zlib1g \ | ||
liblzma5 \ | ||
libncurses5 \ | ||
unattended-upgrades && \ | ||
unattended-upgrade -d -v && \ | ||
apt-get remove -yq unattended-upgrades && \ | ||
apt-get autoremove -yq | ||
|
||
RUN mkdir -p $OPT | ||
COPY --from=builder $OPT $OPT | ||
|
||
## USER CONFIGURATION | ||
RUN adduser --disabled-password --gecos '' ubuntu && chsh -s /bin/bash && mkdir -p /home/ubuntu | ||
|
||
USER ubuntu | ||
WORKDIR /home/ubuntu | ||
|
||
CMD ["/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.0.4 | ||
1.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
if [[ -z "${TMPDIR}" ]]; then | ||
TMPDIR=/tmp | ||
fi | ||
|
||
set -u | ||
|
||
if [ "$#" -lt "1" ] ; then | ||
echo "Please provide an installation path such as /opt/ICGC" | ||
exit 1 | ||
fi | ||
|
||
# get path to this script | ||
SCRIPT_PATH=`dirname $0`; | ||
SCRIPT_PATH=`(cd $SCRIPT_PATH && pwd)` | ||
|
||
# get the location to install to | ||
INST_PATH=$1 | ||
mkdir -p $1 | ||
INST_PATH=`(cd $1 && pwd)` | ||
echo $INST_PATH | ||
|
||
# get current directory | ||
INIT_DIR=`pwd` | ||
|
||
CPU=`grep -c ^processor /proc/cpuinfo` | ||
if [ $? -eq 0 ]; then | ||
if [ "$CPU" -gt "6" ]; then | ||
CPU=6 | ||
fi | ||
else | ||
CPU=1 | ||
fi | ||
echo "Max compilation CPUs set to $CPU" | ||
|
||
mkdir -p $INST_PATH/bin | ||
|
||
# make sure tools installed can see the install loc of libraries | ||
set +u | ||
export LD_LIBRARY_PATH=`echo $INST_PATH/lib:$LD_LIBRARY_PATH | perl -pe 's/:\$//;'` | ||
export PATH=`echo $INST_PATH/bin:$PATH | perl -pe 's/:\$//;'` | ||
export MANPATH=`echo $INST_PATH/man:$INST_PATH/share/man:$MANPATH | perl -pe 's/:\$//;'` | ||
set -u | ||
|
||
##### cgpBigWig installation | ||
make -C c clean | ||
make -C c -j$CPU prefix=$INST_PATH HTSLIB=$INST_PATH/lib | ||
cp bin/bam2bedgraph $INST_PATH/bin/. | ||
cp bin/bwjoin $INST_PATH/bin/. | ||
cp bin/bam2bw $INST_PATH/bin/. | ||
cp bin/bwcat $INST_PATH/bin/. | ||
cp bin/bam2bwbases $INST_PATH/bin/. | ||
cp bin/bg2bw $INST_PATH/bin/. | ||
cp bin/detectExtremeDepth $INST_PATH/bin/. | ||
make -C c clean | ||
|
||
cd $HOME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
if [[ -z "${TMPDIR}" ]]; then | ||
TMPDIR=/tmp | ||
fi | ||
|
||
set -u | ||
|
||
if [ "$#" -lt "1" ] ; then | ||
echo "Please provide an installation path such as /opt/ICGC" | ||
exit 1 | ||
fi | ||
|
||
# get path to this script | ||
SCRIPT_PATH=`dirname $0`; | ||
SCRIPT_PATH=`(cd $SCRIPT_PATH && pwd)` | ||
|
||
# get the location to install to | ||
INST_PATH=$1 | ||
mkdir -p $1 | ||
INST_PATH=`(cd $1 && pwd)` | ||
echo $INST_PATH | ||
|
||
# get current directory | ||
INIT_DIR=`pwd` | ||
|
||
CPU=`grep -c ^processor /proc/cpuinfo` | ||
if [ $? -eq 0 ]; then | ||
if [ "$CPU" -gt "6" ]; then | ||
CPU=6 | ||
fi | ||
else | ||
CPU=1 | ||
fi | ||
echo "Max compilation CPUs set to $CPU" | ||
|
||
|
||
SETUP_DIR=$INIT_DIR/install_tmp | ||
mkdir -p $SETUP_DIR/distro # don't delete the actual distro directory until the very end | ||
mkdir -p $INST_PATH/bin | ||
cd $SETUP_DIR | ||
|
||
|
||
# make sure tools installed can see the install loc of libraries | ||
set +u | ||
export LD_LIBRARY_PATH=`echo $INST_PATH/lib:$LD_LIBRARY_PATH | perl -pe 's/:\$//;'` | ||
export PATH=`echo $INST_PATH/bin:$PATH | perl -pe 's/:\$//;'` | ||
export MANPATH=`echo $INST_PATH/man:$INST_PATH/share/man:$MANPATH | perl -pe 's/:\$//;'` | ||
set -u | ||
|
||
##### DEPS for cgpBigWig ##### | ||
|
||
## HTSLIB (tar.bz2) | ||
if [ ! -e $SETUP_DIR/htslib.success ]; then | ||
rm -rf htslib | ||
mkdir -p htslib | ||
curl -sSL --retry 10 https://github.com/samtools/htslib/releases/download/${VER_HTSLIB}/htslib-${VER_HTSLIB}.tar.bz2 > distro.tar.bz2 | ||
tar --strip-components 1 -C htslib -jxf distro.tar.bz2 | ||
cd htslib | ||
./configure --enable-plugins --enable-libcurl --prefix=$INST_PATH | ||
make clean | ||
make -j$CPU | ||
make install | ||
cd $SETUP_DIR | ||
rm -rf distro.* | ||
touch $SETUP_DIR/htslib.success | ||
fi | ||
|
||
## LIB-BW (tar.gz) | ||
if [ ! -e $SETUP_DIR/libBigWig.success ]; then | ||
curl -sSL --retry 10 https://github.com/dpryan79/libBigWig/archive/${VER_LIBBW}.tar.gz > distro.tar.gz | ||
rm -rf distro/* | ||
tar --strip-components 1 -C distro -xzf distro.tar.gz | ||
make -C distro clean | ||
make -C distro -j$CPU install prefix=$INST_PATH | ||
rm -rf distro.* distro/* | ||
touch $SETUP_DIR/libBigWig.success | ||
fi | ||
|
||
cd $HOME | ||
rm -rf $SETUP_DIR |