Skip to content

Commit

Permalink
Update SQL scripts, Changes and tidy up code
Browse files Browse the repository at this point in the history
- Modify SQL commands to reflect changes in rna_seqc table.
- Update upgrade-schema-60.x SQL script as well as data/schema.txt.
- Change rna_seqc check POD 'DESCRIPTION' to be more accurate.
- Delete instances of the qc_report_dir attribute which is no longer used.
- Update Changes file with latest er... changes.
  • Loading branch information
Ruben E. Bautista committed Jan 20, 2017
1 parent 62ffb52 commit ecff38d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
13 changes: 7 additions & 6 deletions Changes
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions data/schema.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 */;

--
Expand Down
9 changes: 5 additions & 4 deletions lib/npg_qc/autoqc/checks/rna_seqc.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions scripts/upgrade_schema/upgrade_schema-60.x
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
--
--
--
Expand Down
2 changes: 1 addition & 1 deletion t/60-autoqc-checks-rna_seqc.t
Original file line number Diff line number Diff line change
Expand Up @@ -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];
};
Expand Down

0 comments on commit ecff38d

Please sign in to comment.