Skip to content

Commit

Permalink
Changes for release 1.14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
iainrb committed Feb 10, 2017
1 parent 4ac7a2c commit 518fc7f
Show file tree
Hide file tree
Showing 147 changed files with 14,819 additions and 3,904 deletions.
66 changes: 62 additions & 4 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,70 @@ Change log for WTSI genotyping pipeline

Latest version is hosted at: https://github.com/wtsi-npg/genotyping

Unreleased
----------
Release 1.14.0: 2017-02-07
--------------------------

Added:
- Gencall workflow:
- Writes Plink data and runs QC for Gencall only
- New option in ready_workflow.pl
- Replace old identity metric with new Bayesian version, which will:
- Appear in main QC output and plots
- Contribute to sample pass/fail status

Changed:
- Extensive refactoring of Collation.pm, to make it more maintainable
and support Log4Perl. Module renamed Collator.pm and changed into a
Moose class.

Fixed:
- Check for allowed combination of plex manifests and VCF files in
workflow arguments (Issue #434)
- Create Text::CSV objects with binary flag enabled (Issue #406)


Release 1.13.2: 2016-11-10
--------------------------

Changed:
- Hotfix: Add cgp and ddd references to WTSI::NPG::Genotyping::QC::Identity


Release 1.13.1: 2016-07-28
--------------------------

Changed:
- Made install.sh more transparent and portable.
- Updated WTSI-DNAP-Utilities and perl-irods-wrap versions in install.sh.

Fixed:
- Default LSF queue for Ruby workflows


Release 1.13.0: 2016-06-20
--------------------------

Added:
- Replace old identity check with new Bayesian version in "main" QC output
and plots
- install.sh script to install pipeline and its Perl dependencies
- Documentation for Bayesian identity check

Changed:
- Modified ready_workflow.pl to better align with user SOP
- Use try/catch to handle unexpected errors in retrieving QC plex results
from iRODS
- Updated reference genome for Sequenom iRODS query
- Update perl-irods-wrap dependency to 2.4.0; removes unhelpful warning
messages to STDERR. This in turn requires baton version >= 0.16.4.

Removed:
- Script publish_infinium_file_list.pl; superseded by other publish scripts


Release 1.12.1: 2016-05-13
--------------------------

Fixed:
- Support repeat scans from Infinium database


Release 1.13.2: 2016-11-10
Expand Down
1 change: 1 addition & 0 deletions src/bash/cpanm.sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9da50e155df72bce55cb69f51f1dbb4b62d23740fb99f6178bb27f22ebdf8a46 ./App-cpanminus-1.7042.tar.gz
151 changes: 86 additions & 65 deletions src/bash/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,66 @@

# similar in purpose to npg_irods/scripts/travis_install.sh

set -e # script will exit if any command has a non-zero return value

# check for environment variables
if [ -z $INSTALL_ROOT ]; then
echo "INSTALL_ROOT environment variable must specify the path to a directory for installation; exiting." >&2
echo "Environment variable INSTALL_ROOT must specify directory path for installation; exiting." >&2
exit 1
fi
if [ -z $RUBY_HOME ]; then
echo "Required environment variable RUBY_HOME not set; exiting." 1>&2
exit 1
fi
if [ -z $GEM_PATH ]; then
echo "Required environment variable GEM_PATH not set; exiting." 1>&2
exit 1
elif [ ! -e $INSTALL_ROOT ]; then
echo "INSTALL_ROOT environment variable path $INSTALL_ROOT does not exist; exiting." >&2
fi
if [ -n $GEM_HOME ]; then
echo "Warning: Existing GEM_HOME variable '$GEM_HOME' will be changed to value of INSTALL_ROOT" 1>&2
fi

# test that INSTALL_ROOT is a writable directory
if [ ! -e $INSTALL_ROOT ]; then
echo "INSTALL_ROOT environment variable path $INSTALL_ROOT does not exist; exiting." 1>&2
exit 1
elif [ ! -d $INSTALL_ROOT ]; then
echo "INSTALL_ROOT environment variable path $INSTALL_ROOT is not a directory; exiting." >&2
echo "INSTALL_ROOT environment variable path $INSTALL_ROOT is not a directory; exiting." 1>&2
exit 1
elif [ ! -w $INSTALL_ROOT ]; then
echo "INSTALL_ROOT environment variable path $INSTALL_ROOT is not writable; exiting." 1>&2
exit 1
else
echo "Installing pipeline to root directory $INSTALL_ROOT"
fi

WTSI_DNAP_UTILITIES_VERSION="0.5.2"
# set Ruby environment variables
export PATH=$RUBY_HOME/bin:$PATH
export MANPATH=$RUBY_HOME/share/man:$MANPATH
export GEM_HOME=$INSTALL_ROOT
# split GEM_PATH to find a bin directory
IFS=':' # IFS = Bash "Internal Field Separator"
GEM_ARRAY=($GEM_PATH)
unset IFS
GEM_BIN=${GEM_ARRAY[0]}/bin
if [ ! -e $GEM_BIN ]; then
echo "Expected Ruby script directory '$GEM_BIN' does not exist" 1>&2
exit 1
elif [ ! -d $GEM_BIN ]; then
echo "Expected Ruby script directory '$GEM_BIN' is not a directory" 1>&2
exit 1
fi
export PATH=$GEM_BIN:$PATH
# update GEM_PATH
export GEM_PATH=$INSTALL_ROOT:$GEM_PATH

# version numbers
CPANM_VERSION="1.7042"
WTSI_DNAP_UTILITIES_VERSION="0.5.3"
ML_WAREHOUSE_VERSION="2.1"
ALIEN_TIDYP_VERSION="1.4.7"
NPG_TRACKING_VERSION="85.3"
NPG_IRODS_VERSION="2.5.0"
RUBY_VERSION="1.8.7-p330"
LIB_RUBY_VERSION="0.3.0"

START_DIR=$PWD

Expand All @@ -39,18 +79,46 @@ SRC_DIRS=($PERL_DIR $RUBY_DIR)
for DIR in ${SRC_DIRS[@]}; do
if [ ! -d $DIR ]; then
echo -n "Genotyping source code directory $DIR not found; "
echo "install halted" >&2
echo "install halted" 1>&2
exit 1
fi
done

# ensure temporary directory is cleaned up (even after unexpected exit)
function finish {
cd $START_DIR
rm -Rf $TEMP
}
trap finish EXIT

# create and cd to temp directory
TEMP_NAME=`mktemp -d genotyping_temp.XXXXXXXX`
TEMP=`readlink -f $TEMP_NAME` # full path to temp directory
CPANM_TEMP="$TEMP/cpanm"
mkdir $CPANM_TEMP
export PERL_CPANM_HOME=$CPANM_TEMP
export PATH=$TEMP:$PATH # ensure cpanm download is on PATH
export PERL_CPANM_HOME="$TEMP/cpanm_home"
mkdir $PERL_CPANM_HOME
mkdir "$TEMP/cpanm" # cpanm installation directory
export PATH=$TEMP/cpanm/bin:$PATH # ensure cpanm download is on PATH
cd $TEMP

# Download, verify and install cpanm
# See checksum at http://www.cpan.org/authors/id/M/MI/MIYAGAWA/CHECKSUMS
CPANM_TARFILE=App-cpanminus-$CPANM_VERSION.tar.gz
CPANM_URL=http://search.cpan.org/CPAN/authors/id/M/MI/MIYAGAWA/$CPANM_TARFILE
wget $CPANM_URL
sha256sum -c $SCRIPT_DIR/cpanm.sha256 # verify checksum of the cpanm download
tar -xzf $CPANM_TARFILE
cd App-cpanminus-$CPANM_VERSION
perl Makefile.PL INSTALL_BASE=$TEMP/cpanm
make
make test
make install
CPANM_SCRIPT=$TEMP/cpanm/bin/cpanm
if [ ! -e $CPANM_SCRIPT ]; then
echo "Cannot find cpanm script '$CPANM_SCRIPT'; install halted" 1>&2
exit 1
fi
echo -n "cpanm script is $CPANM_SCRIPT, version: "
$CPANM_SCRIPT --version
cd $TEMP

# use wget to download tarballs to install
Expand All @@ -62,17 +130,9 @@ https://github.com/wtsi-npg/perl-irods-wrap/releases/download/$NPG_IRODS_VERSION

for URL in ${URLS[@]}; do
wget $URL
if [ $? -ne 0 ]; then
echo -n "Failed to download $URL; non-zero exit status " >&2
echo " from wget; install halted" >&2
exit 1
fi
done
eval $(perl -Mlocal::lib=$INSTALL_ROOT) # set environment variables

# use local installation of cpanm
module load cpanm/1.7042

# install prerequisites from tarfiles
TARFILES=(WTSI-DNAP-Utilities-$WTSI_DNAP_UTILITIES_VERSION.tar.gz \
ml_warehouse-$ML_WAREHOUSE_VERSION.tar.gz \
Expand All @@ -81,67 +141,28 @@ npg-tracking-$NPG_TRACKING_VERSION.tar.gz \
WTSI-NPG-iRODS-$NPG_IRODS_VERSION.tar.gz)

for FILE in ${TARFILES[@]}; do
cpanm --installdeps $FILE --self-contained --notest
if [ $? -ne 0 ]; then
echo "cpanm --installdeps failed for $FILE; install halted" >&2
exit 1
fi
cpanm --install $FILE --notest
if [ $? -ne 0 ]; then
echo "cpanm --install failed for $FILE; install halted" >&2
exit 1
fi
$CPANM_SCRIPT --installdeps $FILE --self-contained --notest
$CPANM_SCRIPT --install $FILE --notest
done

cd $PERL_DIR

cpanm --installdeps . --self-contained --notest
if [ $? -ne 0 ]; then
echo "cpanm --installdeps failed for genotyping; install halted" >&2
exit 1
fi
$CPANM_SCRIPT --installdeps . --self-contained --notest

perl Build.PL
./Build install --install_base $INSTALL_ROOT
if [ $? -ne 0 ]; then
echo "Genotyping pipeline Perl installation failed; install halted " >&2
exit 1
fi

# now set Ruby environment variables and install
if [ -z $RUBY_HOME ]; then
export RUBY_HOME=/software/gapi/pkg/ruby/$RUBY_VERSION
fi
export PATH=$RUBY_HOME/bin:$PATH
export MANPATH=$RUBY_HOME/share/man:$MANPATH
if [ -z $GEM_HOME ]; then
export GEM_HOME=$INSTALL_ROOT
fi
if [ -z $GEM_PATH ]; then
export GEM_PATH=/software/gapi/pkg/lib-ruby/$LIB_RUBY_VERSION
fi
export GEM_PATH=$INSTALL_ROOT:$GEM_PATH
export PATH=$GEM_PATH/bin:$PATH
echo "Perl installation complete; now installing Ruby."

cd $RUBY_DIR
GENOTYPING_GEM=`rake gem | grep File | cut -f 4 -d " "`
if [ $? -ne 0 ]; then
echo "'rake gem' failed for genotyping; install halted" >&2
exit 1
fi
GEM_FILE_PATH=pkg/$GENOTYPING_GEM
if [ ! -f $GEM_FILE_PATH ]; then
echo "Expected gem file '$GEM_FILE_PATH' not found; install halted" >&2
echo "Expected gem file '$GEM_FILE_PATH' not found; install halted" 1>&2
exit 1
fi
gem install $GEM_FILE_PATH
if [ $? -ne 0 ]; then
echo "'gem install' failed for genotyping; install halted" >&2
exit 1
fi

# clean up temporary directory
cd $START_DIR
rm -Rf $TEMP
echo "Ruby installation complete."

exit 0
1 change: 1 addition & 0 deletions src/perl/Build.PL
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ my $build = Build->new
'Text::CSV' => '>= 1.33',
'Try::Tiny' => '>= 0.22',
'URI' => '>= 1.67',
'WTSI::DNAP::Utilities' => '>= 0.5.3',
'WTSI::DNAP::Warehouse::Schema' => '>= 1.1',
'WTSI::NPG::iRODS' => '>= 2.1.0'
},
Expand Down
Loading

0 comments on commit 518fc7f

Please sign in to comment.