Skip to content

Commit

Permalink
Merge pull request #532 from wtsi-npg/devel
Browse files Browse the repository at this point in the history
merge from devel to create release 65.0
  • Loading branch information
mgcam authored Jun 21, 2018
2 parents e9f2574 + fc3bfce commit 60df3a3
Show file tree
Hide file tree
Showing 83 changed files with 1,397 additions and 6,510 deletions.
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,29 @@ env:
- TRAVIS_NODE_VERSION="6.12.2"
- TRAVIS_NPM_VERSION="4.5.0"
- TRAVIS_YARN_VERSION="1.3.2"
- TRAVIS_PYTHON_VERSION="2.7"
- WTSI_NPG_GITHUB_URL=https://github.com/wtsi-npg
- IRODS_VERSION=4.1.10 PG_PLUGIN_VERSION=1.10 PLATFORM=ubuntu12
- CONDA_CHANNEL=https://dnap.cog.sanger.ac.uk/npg/conda/test/Ubuntu/12.04/
- CONDA_TEST_ENV=test-environment

before_install:
# workaround for iRODS buffer overflow
# see https://github.com/travis-ci/travis-ci/issues/5227
- sudo hostname "$(hostname | cut -c1-63)"
- sed -e "s/^\\(127\\.0\\.0\\.1.*\\)/\\1 $(hostname | cut -c1-63)/" /etc/hosts > /tmp/hosts
- sudo mv /tmp/hosts /etc/hosts
- ./.travis/before_install_conda.sh
- ./.travis/before_install_mysql57.sh
- ./.travis/before_install.sh

install:
- ./.travis/install.sh

script:
- export PATH=$IRODS_RIP_DIR/iRODS/clients/icommands/bin:$PATH
- ienv
- ils
- ilsresc -l
- export PATH="$HOME/miniconda/bin:$PATH"
- source activate "$CONDA_TEST_ENV"
- ./.travis/script.sh

20 changes: 20 additions & 0 deletions .travis/before_install_conda.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget -q -w 30 https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget -q -w 30 https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi

/bin/bash miniconda.sh -b -p "$HOME/miniconda"
export PATH="$HOME/miniconda/bin:$PATH"
hash -r

conda config --set always_yes yes
conda config --set changeps1 no
conda config --set show_channel_urls true
conda update -q conda

conda config --add channels $CONDA_CHANNEL

# Useful for debugging any issues with conda
conda info -a
12 changes: 6 additions & 6 deletions .travis/before_install_mysql57.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ sudo rm -rf /var/log/mysql

# Get packages from oracle
sudo -E apt-get install libaio1 apparmor
wget http://downloads.mysql.com/archives/get/file/mysql-common_5.7.13-1ubuntu12.04_amd64.deb
wget http://downloads.mysql.com/archives/get/file/libmysqlclient20_5.7.13-1ubuntu12.04_amd64.deb
wget http://downloads.mysql.com/archives/get/file/mysql-community-client_5.7.13-1ubuntu12.04_amd64.deb
wget http://downloads.mysql.com/archives/get/file/mysql-client_5.7.13-1ubuntu12.04_amd64.deb
wget http://downloads.mysql.com/archives/get/file/mysql-community-server_5.7.13-1ubuntu12.04_amd64.deb
wget http://downloads.mysql.com/archives/get/file/mysql-server_5.7.13-1ubuntu12.04_amd64.deb
wget -q http://downloads.mysql.com/archives/get/file/mysql-common_5.7.13-1ubuntu12.04_amd64.deb
wget -q http://downloads.mysql.com/archives/get/file/libmysqlclient20_5.7.13-1ubuntu12.04_amd64.deb
wget -q http://downloads.mysql.com/archives/get/file/mysql-community-client_5.7.13-1ubuntu12.04_amd64.deb
wget -q http://downloads.mysql.com/archives/get/file/mysql-client_5.7.13-1ubuntu12.04_amd64.deb
wget -q http://downloads.mysql.com/archives/get/file/mysql-community-server_5.7.13-1ubuntu12.04_amd64.deb
wget -q http://downloads.mysql.com/archives/get/file/mysql-server_5.7.13-1ubuntu12.04_amd64.deb
sudo debconf-set-selections <<< "mysql-server mysql-server/root_password password \"''\""
sudo debconf-set-selections <<< "mysql-server mysql-server/root_password_again password \"''\""
sudo dpkg-preconfigure mysql-community-server_5.7.13-1ubuntu12.04_amd64.deb
Expand Down
6 changes: 5 additions & 1 deletion .travis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ WTSI_NPG_BUILD_BRANCH=${WTSI_NPG_BUILD_BRANCH:=$TRAVIS_BRANCH}
IRODS_RIP_DIR=${IRODS_RIP_DIR:+$IRODS_RIP_DIR}

sudo apt-get install libgd2-xpm-dev # For npg_tracking
sudo apt-get install liblzma-dev # For npg_qc

# CPAN as in npg_npg_deploy
cpanm --notest --reinstall App::cpanminus
Expand All @@ -26,6 +25,11 @@ cpanm --quiet --notest Alien::Tidyp
cpanm --quiet --notest LWP::Protocol::https
cpanm --quiet --notest https://github.com/chapmanb/vcftools-cpan/archive/v0.953.tar.gz

# Conda
export PATH="$HOME/miniconda/bin:$PATH"
conda create -q --name "$CONDA_TEST_ENV" python=$TRAVIS_PYTHON_VERSION
conda install --name "$CONDA_TEST_ENV" npg_qc_utils

# iRODS
wget -q https://github.com/wtsi-npg/disposable-irods/releases/download/${DISPOSABLE_IRODS_VERSION}/disposable-irods-${DISPOSABLE_IRODS_VERSION}.tar.gz -O /tmp/disposable-irods-${DISPOSABLE_IRODS_VERSION}.tar.gz
tar xfz /tmp/disposable-irods-${DISPOSABLE_IRODS_VERSION}.tar.gz -C /tmp
Expand Down
156 changes: 10 additions & 146 deletions Build.PL
Original file line number Diff line number Diff line change
@@ -1,141 +1,6 @@
use strict;
use warnings;
use npg_tracking::util::build;

my $class = npg_tracking::util::build->subclass(code => <<'EOF');
use strict;
use warnings;
use File::Path qw(make_path remove_tree);
use File::Which qw(which);
use npg_tracking::util::abs_path qw(abs_path);
use File::Basename;
my $C_SOURCE_DIR = q[src];
my $c_tools = {};
if (which('lsb_release') and `lsb_release -a` =~ /precise/ismx) {
$c_tools->{'fastq_summ'} = {'copy' => [qw/fastq_summ/],
'samtools' => 1};
$c_tools->{'fastqcheck'} = {'copy' => [qw/fastqcheck/],
'samtools' => 1};
$c_tools->{'gt_utils'} = {'copy' => [qw/find_gt_match gt_pack/], };
$c_tools->{'norm_fit'} = {'copy' => [qw/norm_fit/], };
}
sub _c_build_dir {
return join(q[/], $C_SOURCE_DIR, shift, 'build');
}
sub _c_src_dir {
return join(q[/], $C_SOURCE_DIR, shift);
}
sub _samtools_option {
my $self = shift;
my ($samtools, $htslib);
# Requires the samtools source code to build
if ($ENV{SAMTOOLS_SOURCE_PATH}) {
$samtools = $ENV{SAMTOOLS_SOURCE_PATH};
} else {
$samtools = _relative_to_bin('samtools')
}
if ($ENV{HTSLIB_INSTALL_PATH}) {
$htslib = $ENV{HTSLIB_INSTALL_PATH};
} else {
$htslib = _relative_to_bin('htsfile')
}
my @pkgs;
if ($samtools && $htslib) {
push @pkgs, "SAMTOOLS_LOC=$samtools";
push @pkgs, "HTSLIB_LOC=$htslib";
if ($self->verbose) {
warn "Found samtools source $samtools\n";
warn "Found htslib installed $htslib\n";
}
}
return \@pkgs;
}
sub _relative_to_bin {
my ($executable) = @_;
my $path;
my @found = which($executable);
if (@found) {
$path = dirname abs_path($found[0]);
if ($path =~ m{/bin\Z}smx) {
$path = dirname $path;
}
}
return $path;
}
sub ACTION_build {
my $self = shift;
$self->SUPER::ACTION_build;
# Build C executables
foreach my $tool ( keys %{$c_tools} ) {
if ($self->verbose) {
warn "Building $tool\n";
}
my $bdir = _c_build_dir($tool);
make_path $bdir;
my $silent = $self->verbose ? q[] : '--silent';
my $extra_info = q[];
if ($c_tools->{$tool}->{'samtools'}) {
my @pkgs = @{$self->_samtools_option()};
if (!@pkgs) {
warn 'samtools and htslib locations not declared or detected, ' .
"skipping $tool build\n";
next;
}
$extra_info = join q[ ], @pkgs;
}
my $command = sprintf 'make %s --directory %s %s',
$silent, _c_src_dir($tool), $extra_info;
if (system $command) {
die "Failed to compile $tool";
}
foreach my $ename ( @{$c_tools->{$tool}->{'copy'}} ) {
$self->copy_if_modified(
from => join(q[/], $bdir, $ename),
to_dir => join(q[/], $self->base_dir(), $self->blib(), 'script'),
flatten => 1);
}
}
# Build R script
$self->copy_if_modified(
from => 'lib/R/gc_bias_data.R',
to_dir => join(q[/], $self->base_dir(), $self->blib()),
flatten => 0);
}
sub ACTION_clean {
my $self = shift;
$self->SUPER::ACTION_clean;
foreach my $tool ( keys %{$c_tools} ) {
if ($self->verbose) {
warn "Cleaning $tool\n";
}
my $silent = $self->verbose ? q[] : '--silent';
system "make clean $silent --directory " . _c_src_dir($tool);
remove_tree _c_build_dir($tool);
}
}
EOF
use WTSI::DNAP::Utilities::Build;

my $requires = {
'autodie' => 0,
Expand All @@ -159,21 +24,21 @@ my $requires = {
'Fcntl' => 0,
'File::Basename' => 0,
'File::Glob' => 0,
'File::Path' => 0,
'File::Path' => 0,
'File::Spec' => 0,
'File::Spec::Functions' => 0,
'File::Slurp' => 0,
'File::Temp' => 0,
'FindBin' => '1.47',
'Getopt::Long' => '2.37',
'Getopt::Std' => 0,
'HTTP::Request' => 0,
'Getopt::Std' => 0,
'HTTP::Request' => 0,
'IPC::SysV' => 0,
'IO::Compress::Xz' => '2.068',
'IO::Uncompress::UnXz' => '2.068',
'JSON' => '2.12',
'JSON::XS' => 0,
'lib' => 0,
'lib' => 0,
'List::MoreUtils' => 0,
'List::Util' => 0,
'LWP::UserAgent' => 0,
Expand Down Expand Up @@ -202,6 +67,7 @@ my $requires = {
'POSIX' => 0,
'Readonly' => 0,
'Readonly::XS' => 0,
'REST::Client' => 0,
'Statistics::Lite' => 0,
'strict' => 0,
'Try::Tiny' => 0,
Expand All @@ -215,7 +81,6 @@ my $requires = {
'npg_common::fastqcheck' => 0,
'npg_common::roles::software_location' => 0,
'npg_common::sequence::reference::base_count' => 0,
'npg_testing::db' => 0,
'npg_tracking::data::reference::list' => 0,
'npg_tracking::data::bait::find' => 0,
'npg_tracking::data::snv::find' => 0,
Expand Down Expand Up @@ -261,17 +126,16 @@ my $build_requires = {
'npg_testing::db' => 0
};

my $builder = $class->new(
my $builder = WTSI::DNAP::Utilities::Build->new(

'module_name' => 'npg_qc',
'dist_author' => q(npg <[email protected]>),
'dist_version' => $class->git_tag(),
'dist_author' => q(wtsi-npg <[email protected]>),
'dist_version' => WTSI::DNAP::Utilities::Build->git_tag(),
'dist_abstract' => 'Illumina and WTSI quality control for Illumina sequencing data',
'license' => 'gpl',

'configure_requires' => {
'ExtUtils::CBuilder' => 0,
'npg_tracking::util::build' => 0,
'WTSI::DNAP::Utilities::Build' => 0,
},

'build_requires' => $build_requires,
Expand Down
16 changes: 14 additions & 2 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
LIST OF CHANGES FOR NPG-QC PACKAGE

release 65.0
- adapter autoqc check - discard code for fastq input
- add genotype_call_results_reporter script to report genotype_call
results to the LIMs
- tag_metics matches_pf_percent only stored to three decimals places now
so trim in viewer
- modified spatial filter qc check to read all run_lane filter.stats files
- changed naming of spatial_filter stats files to <run>_<lane>*.spatial_filter.stats
- upstream_tags qc check - replaced bamindexdecoder with bambi decode
- dropped ability for qc checks to sub-sample input fastq
instead run the checks directly off the cached fastq files
- added fastqcheck code and replaced fastq_summ in Build.PL with fastqcheck
- NovaSeq changes, new InterOp file format and per lane read counts now 64-bit unsigned ints
- make travis happy as running apt-get update by default was disabled.
- NovaSeq run info file size is around 95KB, too large for the text column type.
Column type changed to mediumtext.
- update Build.PL to make C programs only under precise
- upstream_tags autoqc check: standardise access to the tracking database
- 'execute' method of the parent autoqc check to error if input files do not exist
- dependency on tracking XML feeds removed
- bwa0_6 (newer bwa) explicitly requested where bwa aligner is used
- all C source code moved to https://github.com/wtsi-npg/npg_qc_utils, executables are
built by Conda https://github.com/wtsi-npg/npg_conda/tree/devel/recipes/npg_qc_utils/65.0;
Build.PL changed accordingly

release 64.6.3
- update parsing of spatial filter stats in spatial_filter QC check
Expand Down
27 changes: 11 additions & 16 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ bin/npg_qc_save_files.pl
bin/npg_qc_tag_sniff.pl
bin/call_gtck_composite_rpt.pl
bin/composition_fk_backfill
bin/genotype_call_results_reporter
Build.PL
Changes
lib/npg_qc/model/cache_query.pm
Expand Down Expand Up @@ -104,6 +105,8 @@ lib/npg_qc/file_store.pm
lib/npg_qc/mqc/reporter.pm
lib/npg_qc/mqc/outcomes.pm
lib/npg_qc/mqc/outcomes/keys.pm
lib/npg_qc/report/genotype_call.pm
lib/npg_qc/report/common.pm
lib/npg_qc/Schema.pm
lib/npg_qc/Schema/Composition.pm
lib/npg_qc/Schema/Flators.pm
Expand Down Expand Up @@ -170,22 +173,6 @@ lib/R/gc_bias_data.R
MANIFEST
README
scripts/npgqc_dbix_schema_loader.pl
src/fastq_summ/Makefile
src/fastq_summ/fastq_summ.c
src/fastq_summ/fastqcheck.c
src/fastq_summ/fastqcheck.h
src/gt_utils/Makefile
src/gt_utils/README
src/gt_utils/find_gt_match.c
src/gt_utils/fld_desc.c
src/gt_utils/fld_desc.h
src/gt_utils/gt_pack.c
src/gt_utils/gt_pack.h
src/gt_utils/intvec.c
src/gt_utils/intvec.h
src/window_depth.d
src/norm_fit/Makefile
src/norm_fit/norm_fit.c
t/00-critic.t
t/00-distribution.t
t/00-podcoverage.t
Expand Down Expand Up @@ -289,6 +276,7 @@ t/60-autoqc-results-tag_metrics.t
t/60-autoqc-results-verify_bam_id.t
t/70-mqc-reporter.t
t/70-mqc-outcomes.t
t/70-report-genotype_call.t
t/80-autoqc-qc-script.t
t/data/config.ini
t/data/api_dbic_fixtures/npg_qc/RunTimeline.yml
Expand Down Expand Up @@ -654,6 +642,13 @@ t/data/nfs/sf44/ILorHSany_sf25/incoming/100925_HS8_05330_B_205NNABXX/RunInfo.xml
t/data/qcoutcomes/fixtures/000-mqc_library_outcome_dict.yml
t/data/qcoutcomes/fixtures/000-mqc_outcome_dict.yml
t/data/qcoutcomes/fixtures/000-uqc_outcome_dict.yml
t/data/report/genotype_call/mlwarehouse/200-Sample.yml
t/data/report/genotype_call/mlwarehouse/300-IseqFlowcell.yml
t/data/report/genotype_call/mlwarehouse/300-IseqProductMetric.yml
t/data/report/genotype_call/npg_qc/genotype_call.yml
t/data/report/genotype_call/npg_qc/seq_component_composition.yml
t/data/report/genotype_call/npg_qc/seq_component.yml
t/data/report/genotype_call/npg_qc/seq_composition.yml
t/data/reporter/npg_qc/mqc_outcome_dict.yml
t/data/reporter/npg_qc/mqc_outcome_ent.yml
t/data/reporter/npg_qc/seq_component.yml
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ scripts directory:

src directory:
--------------
source code for C utilities
Moved to https://github.com/wtsi-npg/npg_qc_utils

t directory:
------------
Expand Down
Loading

0 comments on commit 60df3a3

Please sign in to comment.