From d1b86e34a7d481396fcb706be54e43b9d31c6bc8 Mon Sep 17 00:00:00 2001 From: David Jones Date: Mon, 26 Mar 2018 09:31:37 +0100 Subject: [PATCH 1/6] Correction to htslib and samtools links. CHANGES.md updated. Version bumped. --- CHANGES.md | 3 +++ lib/Sanger/CGP/Vagrent.pm | 2 +- setup.sh | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index a151783..263ac49 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,8 @@ # CHANGES +## 3.3.2 +* Actually get the new `htslib` and `samtools` links correct in `setup.sh` + ## 3.3.1 * `samtools` and `htslib` updated to 1.7 * `Bio::DB::HTS` updated to 2.10, fixes error with GRCh38 contig names in Tabix. diff --git a/lib/Sanger/CGP/Vagrent.pm b/lib/Sanger/CGP/Vagrent.pm index 6d4d78d..87fcf9a 100644 --- a/lib/Sanger/CGP/Vagrent.pm +++ b/lib/Sanger/CGP/Vagrent.pm @@ -26,7 +26,7 @@ use strict; use Const::Fast qw(const); use base 'Exporter'; -our $VERSION = '3.3.1'; +our $VERSION = '3.3.2'; our @EXPORT = qw($VERSION); 1; diff --git a/setup.sh b/setup.sh index eeb156f..59aea56 100755 --- a/setup.sh +++ b/setup.sh @@ -21,8 +21,8 @@ # along with this program. If not, see . ##########LICENCE########## -SOURCE_SAMTOOLS="https://github.com/samtools/samtools/releases/download/1.3.1/samtools-1.7.tar.bz2" -SOURCE_HTSLIB="https://github.com/samtools/htslib/releases/download/1.3.2/htslib-1.7.tar.bz2" +SOURCE_SAMTOOLS="https://github.com/samtools/htslib/releases/download/1.7/htslib-1.7.tar.bz2" +SOURCE_HTSLIB="https://github.com/samtools/samtools/releases/download/1.7/samtools-1.7.tar.bz2" SOURCE_BIOBDHTS="https://github.com/Ensembl/Bio-HTS/archive/2.10.tar.gz" SOURCE_VCFTOOLS="https://github.com/vcftools/vcftools/releases/download/v0.1.14/vcftools-0.1.14.tar.gz" # Warning bedtools 2.24.0 and 2.25.0 have a swapped usage in coverageBed From bd0f912b520555080fdc6ada9ddd3a53d38e017e Mon Sep 17 00:00:00 2001 From: David Jones Date: Mon, 26 Mar 2018 09:32:52 +0100 Subject: [PATCH 2/6] Minor farmatting change to CHANGES.md. --- CHANGES.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 263ac49..61e52c8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,17 +1,21 @@ # CHANGES ## 3.3.2 + * Actually get the new `htslib` and `samtools` links correct in `setup.sh` ## 3.3.1 + * `samtools` and `htslib` updated to 1.7 * `Bio::DB::HTS` updated to 2.10, fixes error with GRCh38 contig names in Tabix. * Update tabix query to use `query_full` ## 3.3.0 + * Complete re-write of the reference generation code ## 3.2.2 + * Add bedtools2 to `setup.sh` * Added bedtools2 to `README.md` * Changes `Bio::DB::HTS`, `samtools` and `HTSlib` install methods. @@ -20,15 +24,18 @@ same start coord are sorted in a stable way. ## 3.2.0 + * Allows use of ensemblgenomes.org as a datasource * Handle genes without names, and give more useful error message * Ensure an error code is emmitted on failure ## 3.1.0 + * Adds travis testing * Cleans up install script and adds multi versioned paths to options ## 3.0.0 + * Removed use of legacy Tabix codebase and switches to samtools 1.2+ * Switches to gihub version of vcftools and makes several patches unnecessary * Several bugfixes From 1396d8131691c6a5d6c89e67c6d97bfcfc9982fe Mon Sep 17 00:00:00 2001 From: David Jones Date: Mon, 26 Mar 2018 10:02:05 +0100 Subject: [PATCH 3/6] Changes to bioDBHts install --- setup.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 59aea56..66aa016 100755 --- a/setup.sh +++ b/setup.sh @@ -198,9 +198,11 @@ if [[ "x$CHK" == "x" ]] ; then cd $SETUP_DIR rm -rf bioDbHts get_distro "bioDbHts" $SOURCE_BIOBDHTS + mkdir -p bioDbHts tar --strip-components 1 -C bioDbHts -zxf bioDbHts.tar.gz cd bioDbHts - perl Build.PL --install_base=$INST_PATH --htslib=$INST_PATH + perl Build.PL --htslib=$HTSLIB --install_base=$INST_PATH + ./Build ./Build test ./Build install cd $SETUP_DIR From 270193ea4ccf047f176952c01576be7161297938 Mon Sep 17 00:00:00 2001 From: David Jones Date: Mon, 26 Mar 2018 10:52:33 +0100 Subject: [PATCH 4/6] 2.9 BIO::DB::HTS --- setup.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 66aa016..d022747 100755 --- a/setup.sh +++ b/setup.sh @@ -23,7 +23,7 @@ SOURCE_SAMTOOLS="https://github.com/samtools/htslib/releases/download/1.7/htslib-1.7.tar.bz2" SOURCE_HTSLIB="https://github.com/samtools/samtools/releases/download/1.7/samtools-1.7.tar.bz2" -SOURCE_BIOBDHTS="https://github.com/Ensembl/Bio-HTS/archive/2.10.tar.gz" +SOURCE_BIOBDHTS="https://github.com/Ensembl/Bio-HTS/archive/2.9.tar.gz" SOURCE_VCFTOOLS="https://github.com/vcftools/vcftools/releases/download/v0.1.14/vcftools-0.1.14.tar.gz" # Warning bedtools 2.24.0 and 2.25.0 have a swapped usage in coverageBed # No upgrades until [this ticket](https://github.com/arq5x/bedtools2/issues/319) is resolved @@ -162,6 +162,8 @@ else touch $SETUP_DIR/$CURR_TOOL.success fi + +echo -n "Get htslib ..." if [ -e $SETUP_DIR/htslibGet.success ]; then echo " already staged ..."; else From 81657d17b149b4e9b0be888dfbaeaf5bf17eb6c3 Mon Sep 17 00:00:00 2001 From: David Jones Date: Mon, 26 Mar 2018 13:15:31 +0100 Subject: [PATCH 5/6] Modfications to setup.sh * Move samtools install to ensure includes etc available for Bio::DB:HTS. * Added a couple of echo statements for clarity. * At some point we should remove the installs od bedtools etc and replace with a warning. --- setup.sh | 60 +++++++++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/setup.sh b/setup.sh index d022747..a8d9b62 100755 --- a/setup.sh +++ b/setup.sh @@ -23,7 +23,7 @@ SOURCE_SAMTOOLS="https://github.com/samtools/htslib/releases/download/1.7/htslib-1.7.tar.bz2" SOURCE_HTSLIB="https://github.com/samtools/samtools/releases/download/1.7/samtools-1.7.tar.bz2" -SOURCE_BIOBDHTS="https://github.com/Ensembl/Bio-HTS/archive/2.9.tar.gz" +SOURCE_BIOBDHTS="https://github.com/Ensembl/Bio-HTS/archive/2.10.tar.gz" SOURCE_VCFTOOLS="https://github.com/vcftools/vcftools/releases/download/v0.1.14/vcftools-0.1.14.tar.gz" # Warning bedtools 2.24.0 and 2.25.0 have a swapped usage in coverageBed # No upgrades until [this ticket](https://github.com/arq5x/bedtools2/issues/319) is resolved @@ -119,16 +119,20 @@ cd $SETUP_DIR ## grab cpanm and stick in workspace, then do a self upgrade into bin: get_file $SETUP_DIR/cpanm https://cpanmin.us/ -perl $SETUP_DIR/cpanm -l $INST_PATH App::cpanminus +perl $SETUP_DIR/cpanm --no-wget -l $INST_PATH App::cpanminus CPANM=`which cpanm` echo $CPANM -perlmods=( "File::ShareDir" "File::ShareDir::Install" "Module::Build" "Bio::Root::Version@1.006924") - -for i in "${perlmods[@]}" ; do - echo -n "Installing build prerequisite $i..." - $CPANM --notest --mirror http://cpan.metacpan.org -l $INST_PATH $i -done +if [ -e $SETUP_DIR/basePerlDeps.success ]; then + echo "Previously installed base perl deps..." +else + perlmods=( "File::ShareDir" "File::ShareDir::Install" "Module::Build" "Bio::Root::Version@1.006924") + for i in "${perlmods[@]}" ; do + echo -n "Installing build prerequisite $i..." + $CPANM --no-wget --no-interactive --notest --mirror http://cpan.metacpan.org -l $INST_PATH $i + done + touch $SETUP_DIR/basePerlDeps.success +fi echo -n "Building bedtools2 ..." if [ -e $SETUP_DIR/bedtools.success ]; then @@ -162,7 +166,6 @@ else touch $SETUP_DIR/$CURR_TOOL.success fi - echo -n "Get htslib ..." if [ -e $SETUP_DIR/htslibGet.success ]; then echo " already staged ..."; @@ -190,6 +193,27 @@ fi export HTSLIB=$INST_PATH +cd $INIT_DIR + +echo -n "Building samtools ..." +if [ -e $SETUP_DIR/samtools.success ]; then + echo " previously installed ..."; +else +echo + cd $SETUP_DIR + rm -rf samtools + get_distro "samtools" $SOURCE_SAMTOOLS + mkdir -p samtools + tar --strip-components 1 -C samtools -xjf samtools.tar.bz2 + cd samtools + ./configure --enable-plugins --enable-libcurl --with-htslib=$HTSLIB --prefix=$INST_PATH + make -j$CPU all + make install + cd $SETUP_DIR + rm -f samtools.tar.bz2 + touch $SETUP_DIR/samtools.success +fi + CHK=`perl -le 'eval "require $ARGV[0]" and print $ARGV[0]->VERSION' Bio::DB::HTS` if [[ "x$CHK" == "x" ]] ; then echo -n "Building Bio::DB::HTS ..." @@ -215,24 +239,6 @@ else echo "Bio::DB::HTS already installed ..." fi -if [ -e $SETUP_DIR/samtools.success ]; then - echo " previously installed ..."; -else -echo - cd $SETUP_DIR - rm -rf samtools - get_distro "samtools" $SOURCE_SAMTOOLS - mkdir -p samtools - tar --strip-components 1 -C samtools -xjf samtools.tar.bz2 - cd samtools - ./configure --enable-plugins --enable-libcurl --with-htslib=$HTSLIB --prefix=$INST_PATH - make -j$CPU all - make install - cd $SETUP_DIR - rm -f samtools.tar.bz2 - touch $SETUP_DIR/samtools.success -fi - cd $INIT_DIR echo -n "Installing Perl prerequisites ..." From fc41078bf7d35ff08b751feda5060fd6d4d60220 Mon Sep 17 00:00:00 2001 From: David Jones Date: Mon, 26 Mar 2018 13:21:46 +0100 Subject: [PATCH 6/6] Changes.md update --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index 61e52c8..eb34218 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,7 @@ ## 3.3.2 * Actually get the new `htslib` and `samtools` links correct in `setup.sh` +* Move `samtools` install in `setup.sh` to happen before `Bio::DB::HTS` ## 3.3.1