Skip to content

Commit

Permalink
Merge branch 'hotfix/5.4.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranmraine committed Oct 8, 2020
2 parents 674724e + beff1b5 commit 4598260
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 28 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# CHANGES

## 5.4.2

* use libdeflate /opt installation from cgpbigwig
* performance now applies to samtools via this modification

## 5.4.1

* Compile htslib with libdeflate (thanks to @mflevine)
Expand Down
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/wtsicgp/cgpbigwig:1.5.0 as builder
FROM quay.io/wtsicgp/cgpbigwig:1.5.1 as builder

USER root

Expand All @@ -11,7 +11,6 @@ ARG BWAMEM2_URL="https://github.com/bwa-mem2/bwa-mem2/releases/download/v2.0pre2
ARG STADEN="https://iweb.dl.sourceforge.net/project/staden/staden/2.0.0b11/staden-2.0.0b11-2016-linux-x86_64.tar.gz"
ARG VER_BIODBHTS="3.01"
ARG VER_BWA="v0.7.17"
ARG VER_LIBDEFLATE='v1.6'
ARG VER_HTSLIB="1.11"
ARG VER_SAMTOOLS="1.11"

Expand Down Expand Up @@ -63,7 +62,7 @@ FROM ubuntu:20.04

LABEL maintainer="[email protected]"\
uk.ac.sanger.cgp="Cancer, Ageing and Somatic Mutation, Wellcome Sanger Institute" \
version="5.4.1" \
version="5.4.2" \
description="pcap-core"

ENV OPT /opt/wtsi-cgp
Expand Down
31 changes: 11 additions & 20 deletions build/opt-build-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,25 +52,18 @@ set -u
cpanm --no-wget --no-interactive --notest --mirror http://cpan.metacpan.org -l $INST_PATH Const::Fast
cpanm --no-wget --no-interactive --notest --mirror http://cpan.metacpan.org -l $INST_PATH File::Which

## libdeflate
rm -rf tmp_deflate
mkdir -p tmp_deflate
curl -sSL --retry 10 https://github.com/ebiggers/libdeflate/archive/${VER_LIBDEFLATE}.tar.gz > distro.tar.gz
tar --strip-components 1 -C tmp_deflate -zxf distro.tar.gz
cd tmp_deflate
make -j$CPU CFLAGS="-fPIC -O3" install
PREFIX=$INST_PATH make -j$CPU CFLAGS="-fPIC -O3" install
cd ../
rm -rf distro.*
export HTSLIB=$PWD/tmp_htslib # used after htslib block

# won't build without "development" htslib structure:
# won't build without "development" htslib structure due to need for static linking
## HTSLIB (tar.bz2)
rm -rf tmp_htslib
mkdir -p tmp_htslib
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 tmp_htslib -jxf distro.tar.bz2
cd tmp_htslib
./configure --enable-plugins --enable-libcurl --with-libdeflate --prefix=$INST_PATH
tar --strip-components 1 -C $HTSLIB -jxf distro.tar.bz2
cd $HTSLIB
./configure --enable-plugins --enable-libcurl --with-libdeflate --prefix=$INST_PATH \
CPPFLAGS="-I$INST_PATH/include" \
LDFLAGS="-L${INST_PATH}/lib -Wl,-R${INST_PATH}/lib"
make clean
make -j$CPU
cd ../
Expand All @@ -79,18 +72,16 @@ rm -rf distro.*
make -C c clean
export REF_CACHE=$PWD/t/data/ref_cache/%2s/%2s/%s
export REF_PATH=$REF_CACHE
make -C c -j$CPU prefix=$INST_PATH

env HTSLIB=$PWD/tmp_htslib make -C c -j$CPU prefix=$INST_PATH
env DEFLATE=$PWD/tmp_deflate
cp bin/bam_stats $INST_PATH/bin/.
cp bin/reheadSQ $INST_PATH/bin/.
cp bin/diff_bams $INST_PATH/bin/.
cp bin/mismatchQc $INST_PATH/bin/.
cp bin/mmFlagModifier $INST_PATH/bin/.

rm -rf $REF_CACHE
rm -rf tmp_htslib
rm -rf tmp_deflate
rm -rf $HTSLIB

cpanm --no-wget --no-interactive --notest --mirror http://cpan.metacpan.org --notest -l $INST_PATH --installdeps .
cpanm -v --no-wget --no-interactive --mirror http://cpan.metacpan.org -l $INST_PATH .
Expand Down
5 changes: 2 additions & 3 deletions c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ CFLAGS = -Wall
HTSLOC?=$(HTSLIB)

HTSTMP?=./htslib_tmp
DEFLATETMP?=./deflate_tmp
prefix=?/usr/local/

#Define locations of header files
OPTINC?= -I$(HTSLOC)/ -I/install_tmp/deflate_tmp/
OPTINC?= -I$(HTSLOC)/
INCLUDES= -I./ $(OPTINC) -rdynamic

CAT_INCLUDES+= -I$(prefix)/include
Expand All @@ -47,7 +46,7 @@ CAT_LFLAGS+= -L$(prefix)/lib
# define library paths in addition to /usr/lib
# if I wanted to include libraries not in /usr/lib I'd specify
# their path using -Lpath, something like:
LFLAGS?= -L$(HTSTMP) -L$(DEFLATETMP)
LFLAGS?= -L$(HTSTMP)

# define any libraries to link into executable:
# if I want to link in libraries (libx.so or libx.a) I use the -llibname
Expand Down
2 changes: 1 addition & 1 deletion lib/PCAP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use FindBin qw($Bin);
use File::Which qw(which);
# don't use autodie, only core perl in here

our $VERSION = '5.4.1';
our $VERSION = '5.4.2';
our @EXPORT = qw($VERSION _which);

const my $LICENSE =>
Expand Down
1 change: 0 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export BWAMEM2_URL="https://github.com/bwa-mem2/bwa-mem2/releases/download/v2.0p
export STADEN="https://iweb.dl.sourceforge.net/project/staden/staden/2.0.0b11/staden-2.0.0b11-2016-linux-x86_64.tar.gz"
export VER_BIODBHTS="3.01"
export VER_BWA="v0.7.17"
export VER_LIBDEFLATE='v1.6'
export VER_HTSLIB="1.11"
export VER_SAMTOOLS="1.11"

Expand Down

0 comments on commit 4598260

Please sign in to comment.