diff --git a/Changes b/Changes index 29fbb290b..290c33485 100644 --- a/Changes +++ b/Changes @@ -1,14 +1,15 @@ LIST OF CHANGES FOR NPG-QC PACKAGE + - remove attribute qc_report_dir from check object: the output directory + is created by default using the sample's filename root - upgrade_schema-60.x to create rna_seqc table has been included. - - npg_qc::autoqc::qc_store - load rna_seqc results into npg_qc db - (requires rna_seqc table exists in database). - - Updated data/schema.txt including definition for rna_seqc table. + - npg_qc::autoqc::qc_store - load rna_seqc results into npg_qc db: + requires rna_seqc table exists in database. + - updated data/schema.txt including definition for rna_seqc table. - SeQC: - - Added template for rna_seqc check with selected metrics shown + - added template for rna_seqc check with selected metrics shown in summary - - Include a link to original RNA-SeQC report only visible - when db_lookup=0. + - include a link to original RNA-SeQC report in check's template - translation from a database composition representation to the npg_tracking::glossary::composition type object - db query for compisition-based tables should include a condition diff --git a/data/schema.txt b/data/schema.txt index 7e46aaf8a..3e4071ce7 100644 --- a/data/schema.txt +++ b/data/schema.txt @@ -1140,7 +1140,6 @@ DROP TABLE IF EXISTS `rna_seqc`; CREATE TABLE `rna_seqc` ( `id_rna_seqc` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Auto-generated primary key', `id_seq_composition` bigint(20) unsigned NOT NULL COMMENT 'A foreign key referencing the id_seq_composition column of the seq_composition table', - `path` varchar(256) DEFAULT NULL, `info` text, `rrna` float unsigned DEFAULT NULL, `rrna_rate` float unsigned DEFAULT NULL, @@ -1159,9 +1158,10 @@ CREATE TABLE `rna_seqc` ( `end_3_norm` float unsigned DEFAULT NULL, `other_metrics` text, PRIMARY KEY (`id_rna_seqc`), + UNIQUE KEY `rna_seqc_id_compos_unq` (`id_seq_composition`), KEY `rna_seqc_compos` (`id_seq_composition`), CONSTRAINT `rna_seqc_compos` FOREIGN KEY (`id_seq_composition`) REFERENCES `seq_composition` (`id_seq_composition`) ON DELETE NO ACTION ON UPDATE NO ACTION -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- diff --git a/lib/npg_qc/autoqc/checks/rna_seqc.pm b/lib/npg_qc/autoqc/checks/rna_seqc.pm index 902b6e300..2e25e741f 100644 --- a/lib/npg_qc/autoqc/checks/rna_seqc.pm +++ b/lib/npg_qc/autoqc/checks/rna_seqc.pm @@ -339,10 +339,11 @@ npg_qc::autoqc::checks::rna_seqc =head1 DESCRIPTION -QC check that runs Broad Institute's RNA-SeQC software over an RNA sample. -Files generated by RNA-SeQC are overwriten everytime it is executed and except -for the directory where the metrics are stored (named after Sample ID) all use -the same names. The user must consider this when passing the value of qc_report_dir. +QC check that runs Broad Institute's RNA-SeQC; a java program which computes a +series of quality control metrics for RNA-seq data. The output consists of +HTML reports and tab delimited files of metrics data from which a selection of +them are extracted to generate an autoqc result. The output directory is +created by default using the sample's filename root. =head1 SUBROUTINES/METHODS diff --git a/scripts/upgrade_schema/upgrade_schema-60.x b/scripts/upgrade_schema/upgrade_schema-60.x index 814485485..d594287b2 100644 --- a/scripts/upgrade_schema/upgrade_schema-60.x +++ b/scripts/upgrade_schema/upgrade_schema-60.x @@ -2,7 +2,7 @@ -- Table structure for table `rna_seqc` -- -CREATE TABLE IF NOT EXISTS `rna_seqc` ( +CREATE TABLE `rna_seqc` ( `id_rna_seqc` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Auto-generated primary key', `id_seq_composition` bigint(20) unsigned NOT NULL COMMENT 'A foreign key referencing the id_seq_composition column of the seq_composition table', `info` text, @@ -23,9 +23,10 @@ CREATE TABLE IF NOT EXISTS `rna_seqc` ( `end_3_norm` float unsigned DEFAULT NULL, `other_metrics` text, PRIMARY KEY (`id_rna_seqc`), + UNIQUE KEY `rna_seqc_id_compos_unq` (`id_seq_composition`), KEY `rna_seqc_compos` (`id_seq_composition`), CONSTRAINT `rna_seqc_compos` FOREIGN KEY (`id_seq_composition`) REFERENCES `seq_composition` (`id_seq_composition`) ON DELETE NO ACTION ON UPDATE NO ACTION -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- -- diff --git a/t/60-autoqc-checks-rna_seqc.t b/t/60-autoqc-checks-rna_seqc.t index 58f03a13e..a5c491d79 100644 --- a/t/60-autoqc-checks-rna_seqc.t +++ b/t/60-autoqc-checks-rna_seqc.t @@ -31,7 +31,7 @@ subtest 'Find CLASSPATH' => sub { isa_ok ($rnaseqc, 'npg_qc::autoqc::checks::rna_seqc'); lives_ok { $rnaseqc->result; } 'result object created'; local $ENV{CLASSPATH} = q[]; - throws_ok {npg_qc::autoqc::checks::rna_seqc->new(id_run => 2, path => q[mypath], position => 1, qc_report_dir => q[t/data])} + throws_ok {npg_qc::autoqc::checks::rna_seqc->new(id_run => 2, path => q[mypath], position => 1,)} qr/Can\'t find \'RNA-SeQC\.jar\' because CLASSPATH is not set/, q[Fails to create object when RNA-SeQC.jar not found]; };