From 486f3d078d66fca7fee583b911d5eb21ae3ff1e4 Mon Sep 17 00:00:00 2001 From: Marina Gourtovaia Date: Wed, 18 Dec 2024 10:54:42 +0000 Subject: [PATCH] Updated ORM classes. Updated ORM classes by ingesting changes for the 'sample' table from the prod. database. Added a class for the 'aliqoute' table. --- Changes | 2 + MANIFEST | 1 + .../DNAP/Warehouse/Schema/Result/Aliquot.pm | 288 ++++++++++++++++++ .../DNAP/Warehouse/Schema/Result/Sample.pm | 25 +- 4 files changed, 312 insertions(+), 4 deletions(-) create mode 100644 lib/WTSI/DNAP/Warehouse/Schema/Result/Aliquot.pm diff --git a/Changes b/Changes index c81ec14..3bd2c8b 100644 --- a/Changes +++ b/Changes @@ -3,6 +3,8 @@ LIST OF CHANGES - Fix perlbrew installation by installing libdevel-patchperl-perl in GitHub runner. + - Updated ORM classes by ingesting changes for the 'sample' table from the + production database. Added a class for the 'aliqoute' table. release 6.34.0 (2024-10-24) - Added new delegated methods to WTSI::DNAP::Warehouse::Schema::Result::IseqFlowcell, diff --git a/MANIFEST b/MANIFEST index fed10d7..0545620 100644 --- a/MANIFEST +++ b/MANIFEST @@ -4,6 +4,7 @@ lib/WTSI/DNAP/Warehouse/Schema.pm lib/WTSI/DNAP/Warehouse/Schema/Query/IseqFlowcell.pm lib/WTSI/DNAP/Warehouse/Schema/Query/LibraryDigest.pm lib/WTSI/DNAP/Warehouse/Schema/Query/LimsFlags.pm +lib/WTSI/DNAP/Warehouse/Schema/Result/Aliquot.pm lib/WTSI/DNAP/Warehouse/Schema/Result/CgapAnalyte.pm lib/WTSI/DNAP/Warehouse/Schema/Result/CgapBiomaterial.pm lib/WTSI/DNAP/Warehouse/Schema/Result/CgapHeron.pm diff --git a/lib/WTSI/DNAP/Warehouse/Schema/Result/Aliquot.pm b/lib/WTSI/DNAP/Warehouse/Schema/Result/Aliquot.pm new file mode 100644 index 0000000..1c785f2 --- /dev/null +++ b/lib/WTSI/DNAP/Warehouse/Schema/Result/Aliquot.pm @@ -0,0 +1,288 @@ + +package WTSI::DNAP::Warehouse::Schema::Result::Aliquot; + +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +=head1 NAME + +WTSI::DNAP::Warehouse::Schema::Result::Aliquot + +=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('aliquot'); + +=head1 ACCESSORS + +=head2 id + + data_type: 'bigint' + is_auto_increment: 1 + is_nullable: 0 + +=head2 id_lims + + data_type: 'varchar' + is_nullable: 0 + size: 255 + +The LIMS system that the aliquot was created in + +=head2 aliquot_uuid + + data_type: 'varchar' + is_nullable: 0 + size: 255 + +The UUID of the aliquot in the LIMS system + +=head2 aliquot_type + + data_type: 'varchar' + is_nullable: 0 + size: 255 + +The type of the aliquot + +=head2 source_type + + data_type: 'varchar' + is_nullable: 0 + size: 255 + +The type of the source of the aliquot + +=head2 source_barcode + + data_type: 'varchar' + is_nullable: 0 + size: 255 + +The barcode of the source of the aliquot + +=head2 sample_name + + data_type: 'varchar' + is_nullable: 0 + size: 255 + +The name of the sample that the aliquot was created from + +=head2 used_by_type + + data_type: 'varchar' + is_nullable: 0 + size: 255 + +The type of the entity that the aliquot is used by + +=head2 used_by_barcode + + data_type: 'varchar' + is_nullable: 0 + size: 255 + +The barcode of the entity that the aliquot is used by + +=head2 volume + + data_type: 'decimal' + is_nullable: 0 + size: [10,2] + +The volume of the aliquot (uL) + +=head2 concentration + + data_type: 'decimal' + is_nullable: 1 + size: [10,2] + +The concentration of the aliquot (ng/ul) + +=head2 last_updated + + data_type: 'datetime' + datetime_undef_if_invalid: 1 + is_nullable: 0 + +The date and time that the aliquot was last updated + +=head2 recorded_at + + data_type: 'datetime' + datetime_undef_if_invalid: 1 + is_nullable: 0 + +The date and time that the aliquot was recorded + +=head2 created_at + + data_type: 'datetime' + datetime_undef_if_invalid: 1 + is_nullable: 0 + +The date and time that this record was created + +=head2 insert_size + + data_type: 'integer' + is_nullable: 1 + +The size of the insert in base pairs + +=cut + +__PACKAGE__->add_columns( + 'id', + { data_type => 'bigint', is_auto_increment => 1, is_nullable => 0 }, + 'id_lims', + { data_type => 'varchar', is_nullable => 0, size => 255 }, + 'aliquot_uuid', + { data_type => 'varchar', is_nullable => 0, size => 255 }, + 'aliquot_type', + { data_type => 'varchar', is_nullable => 0, size => 255 }, + 'source_type', + { data_type => 'varchar', is_nullable => 0, size => 255 }, + 'source_barcode', + { data_type => 'varchar', is_nullable => 0, size => 255 }, + 'sample_name', + { data_type => 'varchar', is_nullable => 0, size => 255 }, + 'used_by_type', + { data_type => 'varchar', is_nullable => 0, size => 255 }, + 'used_by_barcode', + { data_type => 'varchar', is_nullable => 0, size => 255 }, + 'volume', + { data_type => 'decimal', is_nullable => 0, size => [10, 2] }, + 'concentration', + { data_type => 'decimal', is_nullable => 1, size => [10, 2] }, + 'last_updated', + { + data_type => 'datetime', + datetime_undef_if_invalid => 1, + is_nullable => 0, + }, + 'recorded_at', + { + data_type => 'datetime', + datetime_undef_if_invalid => 1, + is_nullable => 0, + }, + 'created_at', + { + data_type => 'datetime', + datetime_undef_if_invalid => 1, + is_nullable => 0, + }, + 'insert_size', + { data_type => 'integer', is_nullable => 1 }, +); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + +__PACKAGE__->set_primary_key('id'); + + +# Created by DBIx::Class::Schema::Loader v0.07052 @ 2024-12-18 10:40:33 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:THzPpPHEAv/8hWXfw77wsw + +our $VERSION = '0'; + +__PACKAGE__->meta->make_immutable; + +1; + +__END__ + +=head1 SYNOPSIS + +=head1 DESCRIPTION + +Result class definition in DBIx binding for the multi-lims warehouse database. + +=head1 DIAGNOSTICS + +=head1 CONFIGURATION AND ENVIRONMENT + +=head1 SUBROUTINES/METHODS + +=head1 DEPENDENCIES + +=over + +=item strict + +=item warnings + +=item Moose + +=item MooseX::NonMoose + +=item MooseX::MarkAsMethods + +=item DBIx::Class::Core + +=item DBIx::Class::InflateColumn::DateTime + +=back + +=head1 INCOMPATIBILITIES + +=head1 BUGS AND LIMITATIONS + +=head1 AUTHOR + +Marina Gourtovaia Emg8@sanger.ac.ukE + +=head1 LICENSE AND COPYRIGHT + +Copyright (C) 2024 Genome Research Ltd. + +This file is part of the ml_warehouse package L. + +NPG 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 . + +=cut diff --git a/lib/WTSI/DNAP/Warehouse/Schema/Result/Sample.pm b/lib/WTSI/DNAP/Warehouse/Schema/Result/Sample.pm index 87a56bf..1065926 100644 --- a/lib/WTSI/DNAP/Warehouse/Schema/Result/Sample.pm +++ b/lib/WTSI/DNAP/Warehouse/Schema/Result/Sample.pm @@ -58,7 +58,7 @@ LIM system identifier, e.g. CLARITY-GCLP, SEQSCAPE =head2 uuid_sample_lims data_type: 'varchar' - is_nullable: 1 + is_nullable: 0 size: 36 LIMS-specific sample uuid @@ -457,7 +457,7 @@ __PACKAGE__->add_columns( 'id_lims', { data_type => 'varchar', is_nullable => 0, size => 10 }, 'uuid_sample_lims', - { data_type => 'varchar', is_nullable => 1, size => 36 }, + { data_type => 'varchar', is_nullable => 0, size => 36 }, 'id_sample_lims', { data_type => 'varchar', is_nullable => 0, size => 255 }, 'last_updated', @@ -616,6 +616,23 @@ __PACKAGE__->set_primary_key('id_sample_tmp'); =head1 UNIQUE CONSTRAINTS +=head2 C + +=over 4 + +=item * L + +=item * L + +=back + +=cut + +__PACKAGE__->add_unique_constraint( + 'index_sample_on_id_lims_and_id_sample_lims', + ['id_lims', 'id_sample_lims'], +); + =head2 C =over 4 @@ -798,8 +815,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07052 @ 2024-10-09 15:42:26 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:S5eGEf8q9fTn5qKSp/Et/g +# Created by DBIx::Class::Schema::Loader v0.07052 @ 2024-12-18 10:40:33 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:T/2l001x2GOs91EGZSjK8A our $VERSION = '0';