-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #161 from wtsi-npg/devel
pull from devel to master to create release 6.14.0
- Loading branch information
Showing
6 changed files
with
321 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
|
||
package WTSI::DNAP::Warehouse::Schema::Result::IseqRun; | ||
|
||
# Created by DBIx::Class::Schema::Loader | ||
# DO NOT MODIFY THE FIRST PART OF THIS FILE | ||
|
||
=head1 NAME | ||
WTSI::DNAP::Warehouse::Schema::Result::IseqRun | ||
=head1 DESCRIPTION | ||
Table linking run and flowcell identities with the run folder name | ||
=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<DBIx::Class::InflateColumn::DateTime> | ||
=back | ||
=cut | ||
|
||
__PACKAGE__->load_components('InflateColumn::DateTime'); | ||
|
||
=head1 TABLE: C<iseq_run> | ||
=cut | ||
|
||
__PACKAGE__->table('iseq_run'); | ||
|
||
=head1 ACCESSORS | ||
=head2 id_run | ||
data_type: 'integer' | ||
extra: {unsigned => 1} | ||
is_nullable: 0 | ||
NPG run identifier | ||
=head2 id_flowcell_lims | ||
data_type: 'varchar' | ||
is_nullable: 1 | ||
size: 20 | ||
LIMS specific flowcell id | ||
=head2 folder_name | ||
data_type: 'varchar' | ||
is_nullable: 1 | ||
size: 64 | ||
Runfolder name | ||
=cut | ||
|
||
__PACKAGE__->add_columns( | ||
'id_run', | ||
{ data_type => 'integer', extra => { unsigned => 1 }, is_nullable => 0 }, | ||
'id_flowcell_lims', | ||
{ data_type => 'varchar', is_nullable => 1, size => 20 }, | ||
'folder_name', | ||
{ data_type => 'varchar', is_nullable => 1, size => 64 }, | ||
); | ||
|
||
=head1 PRIMARY KEY | ||
=over 4 | ||
=item * L</id_run> | ||
=back | ||
=cut | ||
|
||
__PACKAGE__->set_primary_key('id_run'); | ||
|
||
|
||
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-04-06 11:14:56 | ||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZXwdsjfvNYCPvDydZNVf5w | ||
|
||
|
||
# You can replace this text with custom code or comments, and it will be preserved on regeneration | ||
|
||
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 | ||
Michael Kubiak E<lt>[email protected]E<gt> | ||
=head1 LICENSE AND COPYRIGHT | ||
Copyright (C) 2021 Genome Research Limited | ||
This file is part of the ml_warehouse package L<https://github.com/wtsi-npg/ml_warehouse>. | ||
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 <http://www.gnu.org/licenses/>. | ||
=cut | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
DROP TABLE IF EXISTS `iseq_run`; | ||
CREATE TABLE `iseq_run` ( | ||
`id_run` int(10) unsigned NOT NULL COMMENT 'NPG run identifier', | ||
`id_flowcell_lims` varchar(20) DEFAULT NULL COMMENT 'LIMS specific flowcell id', | ||
`folder_name` varchar(64) DEFAULT NULL COMMENT 'Runfolder name', | ||
PRIMARY KEY (`id_run`), | ||
KEY `iseq_run_id_flowcell_lims` (`id_flowcell_lims`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\ | ||
COMMENT 'Table linking run and flowcell identities with the run folder name'; | ||
|
||
|
||
alter table pac_bio_run_well_metrics \ | ||
add column hifi_read_bases \ | ||
bigint unsigned DEFAULT NULL COMMENT 'The number of HiFi bases' after short_insert_percent, \ | ||
add column hifi_num_reads \ | ||
int unsigned DEFAULT NULL COMMENT 'The number of HiFi reads' after hifi_read_bases, \ | ||
add column hifi_read_length_mean \ | ||
int unsigned DEFAULT NULL COMMENT 'The mean HiFi read length' after hifi_num_reads , \ | ||
add column hifi_read_quality_median \ | ||
smallint unsigned DEFAULT NULL COMMENT 'The median HiFi base quality' after hifi_read_length_mean, \ | ||
add column hifi_number_passes_mean \ | ||
int unsigned DEFAULT NULL COMMENT 'The mean number of passes per HiFi read' after hifi_read_quality_median, \ | ||
add column hifi_low_quality_read_bases \ | ||
bigint unsigned DEFAULT NULL COMMENT 'The number of HiFi bases filtered due to low quality (<Q20)' after hifi_number_passes_mean, \ | ||
add column hifi_low_quality_num_reads \ | ||
int unsigned DEFAULT NULL COMMENT 'The number of HiFi reads filtered due to low quality (<Q20)' after hifi_low_quality_read_bases, \ | ||
add column hifi_low_quality_read_length_mean \ | ||
int unsigned DEFAULT NULL COMMENT 'The mean length of HiFi reads filtered due to low quality (<Q20)' after hifi_low_quality_num_reads, \ | ||
add column hifi_low_quality_read_quality_median \ | ||
smallint unsigned DEFAULT NULL COMMENT 'The median base quality of HiFi bases filtered due to low quality (<Q20)' after hifi_low_quality_read_length_mean; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
use strict; | ||
use warnings; | ||
use Test::More tests => 7; | ||
use Test::Exception; | ||
|
||
use_ok('WTSI::DNAP::Warehouse::Schema'); | ||
|
||
my $schema; | ||
lives_ok { $schema = WTSI::DNAP::Warehouse::Schema->connect('dbi:SQLite:dbname=:memory:') } | ||
'connected to test in-memory database'; | ||
lives_ok { $schema->deploy() } 'schema deployed'; | ||
|
||
my $rs_run = $schema->resultset('IseqRun'); | ||
|
||
lives_ok { $rs_run->create({id_run => 34726, folder_name => '34726_RUN_FOLDER_8374', id_flowcell_lims => 3847}) } | ||
'inserted non-null values'; | ||
|
||
is_deeply(\{$rs_run->find(34726)->get_columns}, | ||
\{id_run => 34726, folder_name => '34726_RUN_FOLDER_8374', id_flowcell_lims => 3847}, | ||
'retrieved a row'); | ||
|
||
lives_ok { $rs_run->create({id_run => 80364, id_flowcell_lims => 3}) } | ||
'inserted null value into folder_name column'; | ||
|
||
lives_ok { $rs_run->find(80364)->update({folder_name => '80364_RUN_FOLDER_8272', id_flowcell_lims => 8372}) } | ||
'updated values of a row'; |