Skip to content

Commit

Permalink
Merge branch 'hotfix/v6.3.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranmraine committed Apr 18, 2020
2 parents a041a09 + 8fcf5f9 commit 9e3df5e
Show file tree
Hide file tree
Showing 8 changed files with 120 additions and 99 deletions.
82 changes: 19 additions & 63 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,70 +2,26 @@ notifications:
slack: wtsi-cgpit:ptUMR1tkNyZJYd9TpGoss8WR
email: false

env:
- CC=gcc
sudo: false

addons:
apt:
packages:
- autoconf
- bsdtar
- build-essential
- curl
- exonerate
- libboost-iostreams-dev
- libboost-dev
- libbz2-dev
- libcurl4-openssl-dev
- libexpat1-dev
- libgoogle-perftools-dev
- liblzma-dev
- libncurses5-dev
- libpng12-dev
- libpstreams-dev
- lsof
- nettle-dev
- time
- unzip
- zlib1g-dev
- libgd-dev
- libdb-dev
- liblzma-dev
- libgnutls-dev
- libtasn1-6-dev
- p11-kit
services:
- docker

install:
- git clone --depth 1 --single-branch --branch develop https://github.com/cancerit/cgpBigWig.git
- cd cgpBigWig
- ./setup.sh $HOME/wtsi-opt
- cd ../
- rm -rf cgpBigWig
- git clone --depth 1 --single-branch --branch develop https://github.com/cancerit/PCAP-core.git
- cd PCAP-core
- ./setup.sh $HOME/wtsi-opt
- cd ../
- rm -rf PCAP-core
- git clone --depth 1 --single-branch --branch dev https://github.com/cancerit/cgpVcf.git
- cd cgpVcf
- ./setup.sh $HOME/wtsi-opt
- cd ../
- rm -rf cgpVcf
- git clone --depth 1 --single-branch --branch dev https://github.com/cancerit/VAGrENT.git
- cd VAGrENT
- ./setup.sh $HOME/wtsi-opt
- cd ../
- rm -rf VAGrENT
- git clone --depth 1 --single-branch --branch dev https://github.com/cancerit/grass.git
- cd grass
- ./setup.sh $HOME/wtsi-opt
- cd ../
- rm -rf grass

language: perl
script:
- set -e
- echo 'Build and check docker image'
- docker build -t brass .
- docker images | grep -c brass
- echo 'Verify program(s) from each inherited base image - cgpbigwig'
- docker run -t --rm brass bwjoin --version
- echo 'Verify program(s) from each inherited base image - pcap-core'
- docker run -t --rm brass bwa_mem.pl -version
- docker run -t --rm brass bammarkduplicates2 --version
- docker run -t --rm brass samtools --version
- docker run -t --rm brass bash -c 'bwa 2>&1 | grep Version'
- echo 'Verify program(s) from this repo'
- docker run -t --rm brass brass.pl --version
- docker run -t --rm brass brass-group --version
- docker run -t --rm brass brass-assemble --version

perl:
- "5.22"

script:
- ./setup.sh $HOME/wtsi-opt 2
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changes

## v6.3.1

* Handle undefined value edge case #95.
* Thanks to @udvzol for reproducible test data.
* Updated travis build (#89)
* Fixed up dockerfile to reduce build time when testing.

## v6.3.0

* Adds stand alone (supported) docker container
Expand Down
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/wtsicgp/dockstore-cgpmap:3.1.4 as builder
FROM quay.io/wtsicgp/pcap-core:5.0.4 as builder

USER root

Expand Down Expand Up @@ -57,6 +57,11 @@ ADD build/opt-build.sh build/
RUN bash build/opt-build.sh $OPT

# build the tools in this repo, separate to reduce build time on errors
COPY Rsupport Rsupport
COPY distros distros
ADD build/opt-build-local-deps.sh build/
RUN bash build/opt-build-local-deps.sh $OPT

COPY . .
RUN bash build/opt-build-local.sh $OPT

Expand Down
80 changes: 80 additions & 0 deletions build/opt-build-local-deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#! /bin/bash

set -xe

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/:\$//;'`
export PERL5LIB=`echo $INST_PATH/lib/perl5:$PERL5LIB | perl -pe 's/:\$//;'`
set -u

# Rlibs
if [ ! -e $SETUP_DIR/Rlib.success ]; then
cd $INIT_DIR/Rsupport
./setupR.sh $OPT
touch $SETUP_DIR/Rlib.success
fi

## install included distro for velvet
if [ ! -e $SETUP_DIR/velvet.success ]; then
cd $INIT_DIR
cd $INIT_DIR/distros
tar -mzxf velvet_1.2.10.tgz
cd velvet_1.2.10
make MAXKMERLENGTH=95 velveth velvetg
mv velveth $INST_PATH/bin/velvet95h
mv velvetg $INST_PATH/bin/velvet95g
make clean
make velveth velvetg # don't do multi-threaded make
mv velveth $INST_PATH/bin/velvet31h
mv velvetg $INST_PATH/bin/velvet31g
ln -fs $INST_PATH/bin/velvet95h $INST_PATH/bin/velveth
ln -fs $INST_PATH/bin/velvet95g $INST_PATH/bin/velvetg
cd $INIT_DIR
rm -rf $INIT_DIR/distros/velvet_1.2.10
touch $SETUP_DIR/velvet.success
fi

# cleanup all junk
rm -rf $SETUP_DIR
27 changes: 0 additions & 27 deletions build/opt-build-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,33 +49,6 @@ export MANPATH=`echo $INST_PATH/man:$INST_PATH/share/man:$MANPATH | perl -pe 's/
export PERL5LIB=`echo $INST_PATH/lib/perl5:$PERL5LIB | perl -pe 's/:\$//;'`
set -u

# Rlibs
if [ ! -e $SETUP_DIR/Rlib.success ]; then
cd $INIT_DIR/Rsupport
./setupR.sh $OPT
touch $SETUP_DIR/Rlib.success
fi

## install included distro for velvet
if [ ! -e $SETUP_DIR/velvet.success ]; then
cd $INIT_DIR
cd $INIT_DIR/distros
tar -mzxf velvet_1.2.10.tgz
cd velvet_1.2.10
make MAXKMERLENGTH=95 velveth velvetg
mv velveth $INST_PATH/bin/velvet95h
mv velvetg $INST_PATH/bin/velvet95g
make clean
make velveth velvetg # don't do multi-threaded make
mv velveth $INST_PATH/bin/velvet31h
mv velvetg $INST_PATH/bin/velvet31g
ln -fs $INST_PATH/bin/velvet95h $INST_PATH/bin/velveth
ln -fs $INST_PATH/bin/velvet95g $INST_PATH/bin/velvetg
cd $INIT_DIR
rm -rf $INIT_DIR/distros/velvet_1.2.10
touch $SETUP_DIR/velvet.success
fi

## brass c++
if [ ! -e $SETUP_DIR/brass.success ]; then
cd $INIT_DIR
Expand Down
4 changes: 2 additions & 2 deletions perl/bin/brass.pl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/perl

########## LICENCE ##########
# Copyright (c) 2014-2018 Genome Research Ltd.
# Copyright (c) 2014-2020 Genome Research Ltd.
#
# Author: CASM/Cancer IT <cgphelp@sanger.ac.uk>
#
Expand Down Expand Up @@ -371,7 +371,7 @@ =head1 SYNOPSIS
-genome -g Genome fasta file
-species -s Species name
-assembly -as Assembly name
-protocol -pr Sequencing protocol (WGS|WXS|RNA)
-protocol -pr Sequencing protocol (WGS only - remains for compat)
-g_cache -gc Genome cache file.
-viral -vi Virus sequences from NCBI
-microbe -mi Microbe sequences file prefix from NCBI, please exclude '.N.fa.2bit'
Expand Down
8 changes: 4 additions & 4 deletions perl/bin/get_abs_bkpts_from_clipped_reads.pl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/perl

########## LICENCE ##########
# Copyright (c) 2014-2018 Genome Research Ltd.
# Copyright (c) 2014-2020 Genome Research Ltd.
#
# Author: CASM/Cancer IT <cgphelp@sanger.ac.uk>
#
Expand Down Expand Up @@ -600,8 +600,7 @@ sub collect_reads_by_region {
$dir = ($dir eq '+' ? 1 : -1);
$mate_dir = ($mate_dir eq '+' ? 1 : -1);

my @aln = $bam->get_features_by_location($chr, $start, $end);
@aln = grep {
my @aln = grep {
# !is_supplementary($_->flag) &&
$_->get_tag_values('FLAGS') =~ /PAIRED/ &&
$_->get_tag_values('FLAGS') !~ /UNMAPPED/ &&
Expand All @@ -615,13 +614,14 @@ sub collect_reads_by_region {
(
$ignore_mate_pos ||
(
defined $_->mate_seq_id &&
$_->mate_seq_id eq $mate_chr &&
$_->mstrand eq $mate_dir &&
$_->mate_start <= $mate_end &&
$_->mate_start + $_->length - 1 >= $mate_start
)
)
} @aln;
} $bam->get_features_by_location($chr, $start, $end);
return @aln;
}

Expand Down
4 changes: 2 additions & 2 deletions perl/lib/Bio/Brass.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package Bio::Brass;

########## LICENCE ##########
# Copyright (c) 2014-2019 Genome Research Ltd.
# Copyright (c) 2014-2020 Genome Research Ltd.
#
# Author: CASM/Cancer IT <cgphelp@sanger.ac.uk>
#
Expand Down Expand Up @@ -46,7 +46,7 @@ our @EXPORT = qw(find_breakpoints find_dusty_vertices
is_dusty get_isolated_bp_alignment get_isolated_bp_surrounding_region
$VERSION);

our $VERSION = '6.3.0';
our $VERSION = '6.3.1';

=head1 NAME
Expand Down

0 comments on commit 9e3df5e

Please sign in to comment.