Skip to content

Commit

Permalink
Merge pull request #157 from ces/PacQC2021
Browse files Browse the repository at this point in the history
add tables pac_bio_run_well_metrics and pac_bio_product_metrics
  • Loading branch information
mgcam authored Feb 9, 2021
2 parents dfa3f91 + d26db5c commit b6b1a65
Show file tree
Hide file tree
Showing 5 changed files with 801 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
LIST OF CHANGES
---------------

release 6.13.0
- add tables pac_bio_run_well_metrics and pac_bio_product_metrics
to store metrics extracted from PacBio's SMRT Link LIMS

release 6.12.0
- a new iseq_product_ampliconstats table to store per sample
per amplicon statistics that is generated by 'samtools
Expand Down
193 changes: 193 additions & 0 deletions lib/WTSI/DNAP/Warehouse/Schema/Result/PacBioProductMetric.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@

package WTSI::DNAP::Warehouse::Schema::Result::PacBioProductMetric;

# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE

=head1 NAME
WTSI::DNAP::Warehouse::Schema::Result::PacBioProductMetric
=head1 DESCRIPTION
A linking table for the pac_bio_run and pac_bio_run_well_metrics tables with a potential for adding per-product QC data
=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<pac_bio_product_metrics>
=cut

__PACKAGE__->table('pac_bio_product_metrics');

=head1 ACCESSORS
=head2 id_pac_bio_pr_metrics_tmp
data_type: 'integer'
is_auto_increment: 1
is_nullable: 0
=head2 id_pac_bio_rw_metrics_tmp
data_type: 'integer'
is_foreign_key: 1
is_nullable: 0
PacBio run well metrics id, see 'pac_bio_run_well_metrics.id_pac_bio_rw_metrics_tmp'
=head2 id_pac_bio_tmp
data_type: 'integer'
is_foreign_key: 1
is_nullable: 1
PacBio run id, see 'pac_bio_run.id_pac_bio_tmp'
=cut

__PACKAGE__->add_columns(
'id_pac_bio_pr_metrics_tmp',
{ data_type => 'integer', is_auto_increment => 1, is_nullable => 0 },
'id_pac_bio_rw_metrics_tmp',
{ data_type => 'integer', is_foreign_key => 1, is_nullable => 0 },
'id_pac_bio_tmp',
{ data_type => 'integer', is_foreign_key => 1, is_nullable => 1 },
);

=head1 PRIMARY KEY
=over 4
=item * L</id_pac_bio_pr_metrics_tmp>
=back
=cut

__PACKAGE__->set_primary_key('id_pac_bio_pr_metrics_tmp');

=head1 RELATIONS
=head2 pac_bio
Type: belongs_to
Related object: L<WTSI::DNAP::Warehouse::Schema::Result::PacBioRun>
=cut

__PACKAGE__->belongs_to(
'pac_bio',
'WTSI::DNAP::Warehouse::Schema::Result::PacBioRun',
{ id_pac_bio_tmp => 'id_pac_bio_tmp' },
{
is_deferrable => 1,
join_type => 'LEFT',
on_delete => 'SET NULL',
on_update => 'NO ACTION',
},
);

=head2 pac_bio_rw_metrics
Type: belongs_to
Related object: L<WTSI::DNAP::Warehouse::Schema::Result::PacBioRunWellMetric>
=cut

__PACKAGE__->belongs_to(
'pac_bio_rw_metrics',
'WTSI::DNAP::Warehouse::Schema::Result::PacBioRunWellMetric',
{ id_pac_bio_rw_metrics_tmp => 'id_pac_bio_rw_metrics_tmp' },
{ is_deferrable => 1, on_delete => 'CASCADE', on_update => 'NO ACTION' },
);


# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-02-09 11:33:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ea+iVDOfptyUAPyi3Otvyg

our $VERSION = '0';

__PACKAGE__->meta->make_immutable;
1;

=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
=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
52 changes: 50 additions & 2 deletions lib/WTSI/DNAP/Warehouse/Schema/Result/PacBioRun.pm
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,30 @@ LIMs-specific identifier of the tag set for tag
WTSI-wide tag set name for tag
=head2 tag2_sequence
data_type: 'varchar'
is_nullable: 1
size: 30
=head2 tag2_set_id_lims
data_type: 'varchar'
is_nullable: 1
size: 20
=head2 tag2_set_name
data_type: 'varchar'
is_nullable: 1
size: 100
=head2 tag2_identifier
data_type: 'varchar'
is_nullable: 1
size: 30
=head2 plate_barcode
data_type: 'varchar'
Expand Down Expand Up @@ -268,6 +292,14 @@ __PACKAGE__->add_columns(
{ data_type => 'varchar', is_nullable => 1, size => 20 },
'tag_set_name',
{ data_type => 'varchar', is_nullable => 1, size => 100 },
'tag2_sequence',
{ data_type => 'varchar', is_nullable => 1, size => 30 },
'tag2_set_id_lims',
{ data_type => 'varchar', is_nullable => 1, size => 20 },
'tag2_set_name',
{ data_type => 'varchar', is_nullable => 1, size => 100 },
'tag2_identifier',
{ data_type => 'varchar', is_nullable => 1, size => 30 },
'plate_barcode',
{ data_type => 'varchar', is_nullable => 0, size => 255 },
'plate_uuid_lims',
Expand Down Expand Up @@ -308,6 +340,21 @@ __PACKAGE__->set_primary_key('id_pac_bio_tmp');

=head1 RELATIONS
=head2 pac_bio_product_metrics
Type: has_many
Related object: L<WTSI::DNAP::Warehouse::Schema::Result::PacBioProductMetric>
=cut

__PACKAGE__->has_many(
'pac_bio_product_metrics',
'WTSI::DNAP::Warehouse::Schema::Result::PacBioProductMetric',
{ 'foreign.id_pac_bio_tmp' => 'self.id_pac_bio_tmp' },
{ cascade_copy => 0, cascade_delete => 0 },
);

=head2 sample
Type: belongs_to
Expand Down Expand Up @@ -339,8 +386,9 @@ __PACKAGE__->belongs_to(
);


# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-10 15:05:13
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dkAFMFOOZ7+MTrEn5sI6nQ
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-24 15:45:02
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eVqS5iL7i47o9VqosVsjTg


our $VERSION = '0';

Expand Down
Loading

0 comments on commit b6b1a65

Please sign in to comment.