diff --git a/MANIFEST b/MANIFEST index fb1d55f3..433b1834 100644 --- a/MANIFEST +++ b/MANIFEST @@ -241,7 +241,6 @@ lib/npg_tracking/Schema/Result/InstrumentModDict.pm lib/npg_tracking/Schema/Result/InstrumentStatus.pm lib/npg_tracking/Schema/Result/InstrumentStatusAnnotation.pm lib/npg_tracking/Schema/Result/InstrumentStatusDict.pm -lib/npg_tracking/Schema/Result/InstrumentUtilisation.pm lib/npg_tracking/Schema/Result/Manufacturer.pm lib/npg_tracking/Schema/Result/Run.pm lib/npg_tracking/Schema/Result/RunAnnotation.pm diff --git a/lib/npg_tracking/Schema/Result/InstrumentFormat.pm b/lib/npg_tracking/Schema/Result/InstrumentFormat.pm index 036b7a20..3c0d81c5 100644 --- a/lib/npg_tracking/Schema/Result/InstrumentFormat.pm +++ b/lib/npg_tracking/Schema/Result/InstrumentFormat.pm @@ -147,21 +147,6 @@ __PACKAGE__->set_primary_key("id_instrument_format"); =head1 RELATIONS -=head2 instrument_utilisations - -Type: has_many - -Related object: L - -=cut - -__PACKAGE__->has_many( - "instrument_utilisations", - "npg_tracking::Schema::Result::InstrumentUtilisation", - { "foreign.id_instrument_format" => "self.id_instrument_format" }, - { cascade_copy => 0, cascade_delete => 0 }, -); - =head2 instruments Type: has_many @@ -208,8 +193,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:02:30 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:esNDL3mLvW19/fKjWfsX/g +# Created by DBIx::Class::Schema::Loader v0.07052 @ 2024-04-09 10:35:17 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:elkjaVkCGUOAo8WzkpdV/A # Author: david.jackson@sanger.ac.uk # Created: 2010-04-08 diff --git a/lib/npg_tracking/Schema/Result/InstrumentUtilisation.pm b/lib/npg_tracking/Schema/Result/InstrumentUtilisation.pm deleted file mode 100644 index b5af0f96..00000000 --- a/lib/npg_tracking/Schema/Result/InstrumentUtilisation.pm +++ /dev/null @@ -1,275 +0,0 @@ -use utf8; -package npg_tracking::Schema::Result::InstrumentUtilisation; - -# Created by DBIx::Class::Schema::Loader -# DO NOT MODIFY THE FIRST PART OF THIS FILE - -=head1 NAME - -npg_tracking::Schema::Result::InstrumentUtilisation - -=cut - -use strict; -use warnings; - -use Moose; -use MooseX::NonMoose; -use MooseX::MarkAsMethods autoclean => 1; -extends 'DBIx::Class::Core'; - -=head1 COMPONENTS LOADED - -=over 4 - -=item * L - -=back - -=cut - -__PACKAGE__->load_components("InflateColumn::DateTime"); - -=head1 TABLE: C - -=cut - -__PACKAGE__->table("instrument_utilisation"); - -=head1 ACCESSORS - -=head2 id_instrument_utilisation - - data_type: 'bigint' - extra: {unsigned => 1} - is_auto_increment: 1 - is_nullable: 0 - -=head2 date - - data_type: 'date' - datetime_undef_if_invalid: 1 - is_nullable: 0 - -=head2 total_insts - - data_type: 'integer' - default_value: 0 - extra: {unsigned => 1} - is_nullable: 0 - -=head2 perc_utilisation_total_insts - - data_type: 'float' - default_value: 0.00 - extra: {unsigned => 1} - is_nullable: 0 - size: [5,2] - -=head2 perc_uptime_total_insts - - data_type: 'float' - default_value: 0.00 - extra: {unsigned => 1} - is_nullable: 0 - size: [5,2] - -=head2 official_insts - - data_type: 'integer' - default_value: 0 - extra: {unsigned => 1} - is_nullable: 0 - -=head2 perc_utilisation_official_insts - - data_type: 'float' - default_value: 0.00 - extra: {unsigned => 1} - is_nullable: 0 - size: [5,2] - -=head2 perc_uptime_official_insts - - data_type: 'float' - default_value: 0.00 - extra: {unsigned => 1} - is_nullable: 0 - size: [5,2] - -=head2 prod_insts - - data_type: 'integer' - default_value: 0 - extra: {unsigned => 1} - is_nullable: 0 - -=head2 perc_utilisation_prod_insts - - data_type: 'float' - default_value: 0.00 - extra: {unsigned => 1} - is_nullable: 0 - size: [5,2] - -=head2 perc_uptime_prod_insts - - data_type: 'float' - default_value: 0.00 - extra: {unsigned => 1} - is_nullable: 0 - size: [5,2] - -=head2 id_instrument_format - - data_type: 'bigint' - extra: {unsigned => 1} - is_foreign_key: 1 - is_nullable: 0 - -=cut - -__PACKAGE__->add_columns( - "id_instrument_utilisation", - { - data_type => "bigint", - extra => { unsigned => 1 }, - is_auto_increment => 1, - is_nullable => 0, - }, - "date", - { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 0 }, - "total_insts", - { - data_type => "integer", - default_value => 0, - extra => { unsigned => 1 }, - is_nullable => 0, - }, - "perc_utilisation_total_insts", - { - data_type => "float", - default_value => "0.00", - extra => { unsigned => 1 }, - is_nullable => 0, - size => [5, 2], - }, - "perc_uptime_total_insts", - { - data_type => "float", - default_value => "0.00", - extra => { unsigned => 1 }, - is_nullable => 0, - size => [5, 2], - }, - "official_insts", - { - data_type => "integer", - default_value => 0, - extra => { unsigned => 1 }, - is_nullable => 0, - }, - "perc_utilisation_official_insts", - { - data_type => "float", - default_value => "0.00", - extra => { unsigned => 1 }, - is_nullable => 0, - size => [5, 2], - }, - "perc_uptime_official_insts", - { - data_type => "float", - default_value => "0.00", - extra => { unsigned => 1 }, - is_nullable => 0, - size => [5, 2], - }, - "prod_insts", - { - data_type => "integer", - default_value => 0, - extra => { unsigned => 1 }, - is_nullable => 0, - }, - "perc_utilisation_prod_insts", - { - data_type => "float", - default_value => "0.00", - extra => { unsigned => 1 }, - is_nullable => 0, - size => [5, 2], - }, - "perc_uptime_prod_insts", - { - data_type => "float", - default_value => "0.00", - extra => { unsigned => 1 }, - is_nullable => 0, - size => [5, 2], - }, - "id_instrument_format", - { - data_type => "bigint", - extra => { unsigned => 1 }, - is_foreign_key => 1, - is_nullable => 0, - }, -); - -=head1 PRIMARY KEY - -=over 4 - -=item * L - -=back - -=cut - -__PACKAGE__->set_primary_key("id_instrument_utilisation"); - -=head1 UNIQUE CONSTRAINTS - -=head2 C - -=over 4 - -=item * L - -=item * L - -=back - -=cut - -__PACKAGE__->add_unique_constraint("uidx_date_format", ["date", "id_instrument_format"]); - -=head1 RELATIONS - -=head2 instrument_format - -Type: belongs_to - -Related object: L - -=cut - -__PACKAGE__->belongs_to( - "instrument_format", - "npg_tracking::Schema::Result::InstrumentFormat", - { id_instrument_format => "id_instrument_format" }, - { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" }, -); - - -# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:02:30 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:rbmVI5hlEgTZFDj665rTkw - -# Author: david.jackson@sanger.ac.uk -# Created: 2010-04-08 - -our $VERSION = '0'; - -__PACKAGE__->meta->make_immutable; -1; diff --git a/scripts/npg_tracking_dbix_schema_loader.pl b/scripts/npg_tracking_dbix_schema_loader.pl index 3e790c15..dbd00e91 100755 --- a/scripts/npg_tracking_dbix_schema_loader.pl +++ b/scripts/npg_tracking_dbix_schema_loader.pl @@ -29,6 +29,7 @@ use_moose => 1, preserve_case => 1, use_namespaces => 1, + exclude => qr/instrument_utilisation/, rel_name_map => sub { # Rename the id relationship so we can access flat versions of diff --git a/t/60-illumina-run-long_info.t b/t/60-illumina-run-long_info.t index d313d7ed..7c3232ff 100644 --- a/t/60-illumina-run-long_info.t +++ b/t/60-illumina-run-long_info.t @@ -126,9 +126,6 @@ subtest 'detecting onboard analysis' => sub { ); my $li = $class->new_object(); ok ($li->onboard_analysis_planned(), 'onboard analysis is planned'); - - my $o = $li->onboard_analysis_planned(); - diag $o; }; subtest 'getting i5opposite for run' => sub { @@ -366,7 +363,6 @@ subtest 'getting experiment name from runParameters' => sub { my $long_info = Moose::Meta::Class->create_anon_class( methods => {"runfolder_path" => sub {$rfpath}}, roles => [qw/npg_tracking::illumina::run::long_info/])->new_object(); - q{create test role for SP flowcell}; cmp_ok ( $long_info->surface_count, '==', 1, 'surface_count'); is ($long_info->instrument_name, 'A00562', 'instrument name from RunInfo.xml'); } diff --git a/t/data/schema.txt b/t/data/schema.txt index f780813d..45caa00d 100644 --- a/t/data/schema.txt +++ b/t/data/schema.txt @@ -293,33 +293,6 @@ CREATE TABLE `instrument_status_dict` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Table structure for table `instrument_utilisation` --- - -DROP TABLE IF EXISTS `instrument_utilisation`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `instrument_utilisation` ( - `id_instrument_utilisation` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `date` date NOT NULL, - `total_insts` int(4) unsigned NOT NULL DEFAULT '0', - `perc_utilisation_total_insts` float(5,2) unsigned NOT NULL DEFAULT '0.00', - `perc_uptime_total_insts` float(5,2) unsigned NOT NULL DEFAULT '0.00', - `official_insts` int(4) unsigned NOT NULL DEFAULT '0', - `perc_utilisation_official_insts` float(5,2) unsigned NOT NULL DEFAULT '0.00', - `perc_uptime_official_insts` float(5,2) unsigned NOT NULL DEFAULT '0.00', - `prod_insts` int(4) unsigned NOT NULL DEFAULT '0', - `perc_utilisation_prod_insts` float(5,2) unsigned NOT NULL DEFAULT '0.00', - `perc_uptime_prod_insts` float(5,2) unsigned NOT NULL DEFAULT '0.00', - `id_instrument_format` bigint(20) unsigned NOT NULL, - PRIMARY KEY (`id_instrument_utilisation`), - UNIQUE KEY `uidx_date_format` (`date`,`id_instrument_format`), - KEY `inst_format` (`id_instrument_format`), - CONSTRAINT `inst_format` FOREIGN KEY (`id_instrument_format`) REFERENCES `instrument_format` (`id_instrument_format`) ON DELETE NO ACTION ON UPDATE NO ACTION -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Table structure for table `manufacturer` --