diff --git a/MANIFEST b/MANIFEST index 80a8f6b7..e5027ee9 100644 --- a/MANIFEST +++ b/MANIFEST @@ -9,7 +9,6 @@ bin/npg_pipeline_post_qc_review bin/npg_pipeline_preexec_references bin/npg_pipeline_script_must_be_unique_runner bin/npg_pipeline_seqchksum_comparator -bin/npg_receipt4run_is_deletable bin/npg_run_is_deletable Build.PL Changes diff --git a/bin/npg_receipt4run_is_deletable b/bin/npg_receipt4run_is_deletable deleted file mode 100755 index d0ff8c4a..00000000 --- a/bin/npg_receipt4run_is_deletable +++ /dev/null @@ -1,201 +0,0 @@ -#!/usr/bin/env perl - -use strict; -use warnings; -use FindBin qw($Bin $Script); -use lib ( -d "$Bin/../lib/perl5" ? "$Bin/../lib/perl5" : "$Bin/../lib" ); -use Log::Log4perl qw{:levels}; -use Getopt::Long; -use Readonly; -use File::Temp qw(tempdir); -use DateTime; -use Pod::Usage; -use File::Slurp; -use Carp; -use File::Copy; - -use WTSI::DNAP::Warehouse::Schema; - -our $VERSION = '0'; - -Readonly::Scalar my $STATUS_SUCCESS => 'SUCCESS'; -Readonly::Scalar my $STATUS_PASS => 'PASS'; -Readonly::Scalar my $RECEIPT_DELIM => qq[\t]; - -my $help; -my $file_path; - -GetOptions ( - 'help' => \$help, - 'receipt_path=s' => \$file_path, - ); -if ($help) { pod2usage(0); } - - -my $layout = '%d %-5p %c - %m%n'; -Log::Log4perl->easy_init({layout => $layout, - level => $INFO, - utf8 => 1}); -my $logger = Log::Log4perl->get_logger(); - -$file_path or - ($logger->error('--receipt_path argument is required') and exit 1); -$logger->info("Receipt file to use $file_path"); - -my $schema = WTSI::DNAP::Warehouse::Schema->connect(); - -my $rs = $schema->resultset('IseqExternalProductMetric')->search( - {manifest_upload_status => $STATUS_SUCCESS, - format_validation => $STATUS_PASS}, - {column => qw(supplier_sample_name file_name md5_staging)} -); - -my $count = $rs->count; -if ($count == 0) { - $logger->info('No receipts available, exiting'); - exit 0; -} else { - $logger->info("Receipts for $count products are available"); -} - -my @lines = (); -push @lines, join $RECEIPT_DELIM, ('Bucket key', 'WSI_MD5', 'SBG_MD5', 'Match?'); -while (my $row = $rs->next()) { - push @lines, join $RECEIPT_DELIM, - (join q[/], $row->supplier_sample_name, $row->file_name), - $row->md5_staging, - $row->md5_staging, - 'correct'; -} -@lines = map { $_ . qq[\n] } @lines; - -my $tdir = tempdir( CLEANUP => 1 ); -my $filename = "$tdir/receipt"; -$logger->info("Writing to temp file $filename"); -write_file($filename, @lines); -0 == system "bzip2 $filename" or croak "Failed to compress $filename"; -$filename .= '.bz2'; - -my $new_path; -my $compressed_file_path = $file_path . '.bz2'; -if (-e $compressed_file_path) { - if (not -f $compressed_file_path) { - croak "$compressed_file_path exists and is not a file"; - } - $new_path = join q[.], - $file_path, DateTime->now()->strftime(q[%Y%m%d-%T]), 'bz2'; - move($compressed_file_path, $new_path) or croak - "Failed to move $compressed_file_path to $new_path"; -} -move($filename, $compressed_file_path) or croak - "Failed to move $filename to $compressed_file_path"; -$new_path && $logger->info("Moved existing $compressed_file_path to $new_path"); -$logger->info("Created new $compressed_file_path"); - -exit 0; - -__END__ - -=head1 NAME - -npg_receipt4run_is_deletable - -=head1 USAGE - -npg_receipt4run_is_deletable --help - -npg_receipt4run_is_deletable --receipt_path - -=head1 REQUIRED ARGUMENTS - ---receipt_path file path of the receipt - -=head1 OPTIONS - ---help ---receipt_path - -=head1 EXIT STATUS - -0 - -=head1 CONFIGURATION - -=head1 SYNOPSIS - -Uses data from ml warehouse to generate a list of externally -acknowledged products. The list is written to a compressed file. The path -of the new file is as given by the --receipt_path plus the .bz2 extension. - -This file will be used by the npg_run_is_deletable -script, see npg_pipeline::validation::s3. - -=head1 DESCRIPTION - -npg_receipt4run_is_deletable --help -npg_receipt4run_is_deletable --file_path - -=head1 SUBROUTINES/METHODS - -=head1 DIAGNOSTICS - -=head1 CONFIGURATION AND ENVIRONMENT - -=head1 DEPENDENCIES - -=over - -=item strict - -=item warnings - -=item lib - -=item FindBin - -=item Log::Log4perl - -=item Getopt::Long - -=item Readonly - -=item File::Temp - -=item DateTime - -=item Pod::Usage - -=item File::Slurp - -=item Carp - -=item File::Copy - -=item WTSI::DNAP::Warehouse::Schema - -=back - -=head1 INCOMPATIBILITIES - -=head1 BUGS AND LIMITATIONS - -=head1 AUTHOR - -Marina Gourtovaia - -=head1 LICENSE AND COPYRIGHT - -Copyright (C) 2019 Genome Research Limited - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . diff --git a/bin/npg_run_is_deletable b/bin/npg_run_is_deletable index 6ed1450a..396990e5 100755 --- a/bin/npg_run_is_deletable +++ b/bin/npg_run_is_deletable @@ -19,7 +19,6 @@ my $their_log_level = $verbose ? 'DEBUG' : 'WARN'; ##no critic (ValuesAndExpressions::ProhibitImplicitNewlines) my $log4perl_config = qq( log4perl.logger = $my_log_level, A1 - log4perl.category.npg_pipeline.validation.s3 = $their_log_level, A1 log4perl.category.npg_pipeline.validation.irods = $their_log_level, A1 log4perl.category.npg_pipeline.validation.autoqc = $their_log_level, A1 log4perl.logger.WTSI.NPG.iRODS = OFF, A1 diff --git a/lib/npg_pipeline/product/release.pm b/lib/npg_pipeline/product/release.pm index 56f3f6ce..e240921b 100644 --- a/lib/npg_pipeline/product/release.pm +++ b/lib/npg_pipeline/product/release.pm @@ -106,7 +106,6 @@ sub is_release_data { Arg [2] : Str, type of release Example : $obj->is_for_release($product, 'irods'); - $obj->is_for_release($product, 's3'); Description: Return true if the product is to be released via the mechanism defined by the second argument. @@ -376,10 +375,6 @@ product release. The configuration file gives per-study settings and a default to be used for any study without a specific configuration. - S3: - enable: S3 release enabled if true. - url: The S3 bucket URL to send to. - irods: enable: iRODS release enabled if true. @@ -387,24 +382,15 @@ e.g. --- default: - s3: - enable: false - url: null irods: enable: true study: - study_id: "5290" - s3: - enable: true - url: "s3://product_bucket" irods: enable: false - study_id: "1000" - s3: - enable: false - url: null irods: enable: true