From 4d22a34453f023a3e3c499ae46dcce17876d05fe Mon Sep 17 00:00:00 2001 From: mgcam Date: Thu, 26 Aug 2021 11:30:53 +0100 Subject: [PATCH] Drop redundant tag_index column. (#780) Drop redundant tag_index column from the tag_metrics database table. The results of the tag_metrics QC check are always per lane. Only two distinct values in this culumn - NULL and -1, the latter from pre-composition times. --- Changes | 4 ++++ lib/npg_qc/Schema/Result/TagMetrics.pm | 11 ++--------- npg_qc_viewer/t/80-app-run.t | 1 - scripts/upgrade_schema/upgrade_schema-69.9.0 | 5 +++++ 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Changes b/Changes index c3f01beff..f61864599 100644 --- a/Changes +++ b/Changes @@ -7,6 +7,10 @@ release 69.9.0 more data than we envisaged when these tables were set up. - Update pulldown_metrics autoqc check to use the up-to-date Picard metrics via GATK, use CRAM files instead of BAM files as input. + - Drop redundant tag_index column from the tag_metrics QC database + table. The results of this QC check are always per lane. Only two + distinct values in this culumn - NULL and -1, the latter from pre- + composition times. release 69.8.1 - bug fix npg_substitution_metrics.pl to not bail on single read data diff --git a/lib/npg_qc/Schema/Result/TagMetrics.pm b/lib/npg_qc/Schema/Result/TagMetrics.pm index f870e91c0..7864ebc8f 100644 --- a/lib/npg_qc/Schema/Result/TagMetrics.pm +++ b/lib/npg_qc/Schema/Result/TagMetrics.pm @@ -183,11 +183,6 @@ A foreign key referencing the id_seq_composition column of the seq_composition t data_type: 'text' is_nullable: 1 -=head2 tag_index - - data_type: 'bigint' - is_nullable: 1 - =head2 tag_hops_percent data_type: 'float' @@ -259,8 +254,6 @@ __PACKAGE__->add_columns( { data_type => 'text', is_nullable => 1 }, 'info', { data_type => 'text', is_nullable => 1 }, - 'tag_index', - { data_type => 'bigint', is_nullable => 1 }, 'tag_hops_percent', { data_type => 'float', extra => { unsigned => 1 }, is_nullable => 1 }, 'tag_hops_power', @@ -330,8 +323,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result', 'npg_qc::autoqc::role::tag_metrics'; -# Created by DBIx::Class::Schema::Loader v0.07048 @ 2018-04-10 14:09:37 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:01BT+8rbCPfUeB3ItyFNjQ +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-08-19 13:25:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:X85s6Sx84dZtx0r2CpnPQA our $VERSION = '0'; diff --git a/npg_qc_viewer/t/80-app-run.t b/npg_qc_viewer/t/80-app-run.t index 4dbd35e11..bc7576e15 100644 --- a/npg_qc_viewer/t/80-app-run.t +++ b/npg_qc_viewer/t/80-app-run.t @@ -377,7 +377,6 @@ subtest 'Tag metrics as first check in summary table' => sub { id_run => 4025, position => $i, id_seq_composition => $fkid, - tag_index => -1, path=>'some path', metrics_file=>'some other path', barcode_tag_name=>'BC', diff --git a/scripts/upgrade_schema/upgrade_schema-69.9.0 b/scripts/upgrade_schema/upgrade_schema-69.9.0 index 3f4652282..fdb472ea6 100644 --- a/scripts/upgrade_schema/upgrade_schema-69.9.0 +++ b/scripts/upgrade_schema/upgrade_schema-69.9.0 @@ -14,3 +14,8 @@ ALTER TABLE `qx_yield` \ MODIFY `yield2_q30` BIGINT UNSIGNED DEFAULT NULL, \ MODIFY `yield1_q40` BIGINT UNSIGNED DEFAULT NULL, \ MODIFY `yield2_q40` BIGINT UNSIGNED DEFAULT NULL; + + +-- Tag metrics results are per lane, tag_index column is not needed + +ALTER TABLE `tag_metrics` DROP COLUMN `tag_index`;