Skip to content

Commit

Permalink
Merge 6c3e5de into c4f6b2e
Browse files Browse the repository at this point in the history
  • Loading branch information
james-monkeyshines committed Mar 28, 2019
2 parents c4f6b2e + 6c3e5de commit ce67d50
Show file tree
Hide file tree
Showing 15 changed files with 194 additions and 55 deletions.
4 changes: 2 additions & 2 deletions lib/Bio/EnsEMBL/DataCheck/Checks/ControlledAnalysis.pm
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ sub tests {
ad.logic_name,
ad.display_label,
ad.description,
(ad.default_displayable IS NOT NULL),
(ad.displayable IS NOT NULL),
ad.db_version,
wd.data
FROM
analysis_description ad LEFT OUTER JOIN
web_data wd ON ad.default_web_data_id = wd.web_data_id
web_data wd USING (web_data_id)
WHERE
ad.is_current = 1
/;
Expand Down
2 changes: 1 addition & 1 deletion lib/Bio/EnsEMBL/DataCheck/Checks/ExonBounds.pm
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ sub tests {

my $aa = $self->dba->get_adaptor('Attribute');
my $attrib = $aa->fetch_by_code('trans_spliced');
my $attrib_type_id = $attrib->[0];
my $attrib_type_id = $attrib->[0] || 0;

my $exon_transcript_sql = qq/
exon e INNER JOIN
Expand Down
2 changes: 1 addition & 1 deletion lib/Bio/EnsEMBL/DataCheck/Manager.pm
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ sub load_config {

if (!defined $self->output_file) {
if (defined $config{'output_file'} && exists $config{'output_file'}) {
$self->history_file($config{'output_file'});
$self->output_file($config{'output_file'});
}
}
}
Expand Down
7 changes: 6 additions & 1 deletion t/test-genome-DBs/collection/core/meta.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
1 \N schema_type core
2 \N schema_version 96
2 \N schema_version 97
3 \N patch patch_88_89_a.sql|schema_version
4 1 schema.load_started 2017-05-08 19:14:41
5 1 schema.load_started 2017-05-08 19:14:45
Expand Down Expand Up @@ -175,3 +175,8 @@
547 \N patch patch_94_95_a.sql|schema_version
548 \N patch patch_94_95_b.sql|vertebrate_division_rename
549 \N patch patch_95_96_a.sql|schema_version
550 \N patch patch_96_97_a.sql|schema_version
551 \N patch patch_96_97_b.sql|biotype_so_term
552 \N patch patch_96_97_c.sql|rnaproduct_tables
553 \N patch patch_96_97_d.sql|add_object_type_rnaproduct
554 \N patch patch_96_97_e.sql|add_stable_id_event_type_rnaproduct
43 changes: 40 additions & 3 deletions t/test-genome-DBs/collection/core/table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ CREATE TABLE `biotype` (
`description` text,
`biotype_group` enum('coding','pseudogene','snoncoding','lnoncoding','mnoncoding','LRG','undefined','no_group') DEFAULT NULL,
`so_acc` varchar(64) DEFAULT NULL,
`so_term` varchar(1023) DEFAULT NULL,
PRIMARY KEY (`biotype_id`),
UNIQUE KEY `name_type_idx` (`name`,`object_type`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Expand Down Expand Up @@ -489,7 +490,7 @@ CREATE TABLE `meta` (
PRIMARY KEY (`meta_id`),
UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`),
KEY `species_value_idx` (`species_id`,`meta_value`)
) ENGINE=MyISAM AUTO_INCREMENT=550 DEFAULT CHARSET=latin1 CHECKSUM=1;
) ENGINE=MyISAM AUTO_INCREMENT=555 DEFAULT CHARSET=latin1 CHECKSUM=1;

CREATE TABLE `meta_coord` (
`table_name` varchar(40) NOT NULL,
Expand Down Expand Up @@ -538,7 +539,7 @@ CREATE TABLE `misc_set` (
CREATE TABLE `object_xref` (
`object_xref_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`ensembl_id` int(10) unsigned NOT NULL,
`ensembl_object_type` enum('RawContig','Transcript','Gene','Translation','Operon','OperonTranscript','Marker') NOT NULL,
`ensembl_object_type` enum('RawContig','Transcript','Gene','Translation','Operon','OperonTranscript','Marker','RNAProduct') NOT NULL,
`xref_id` int(10) unsigned NOT NULL,
`linkage_annotation` varchar(255) DEFAULT NULL,
`analysis_id` smallint(5) unsigned DEFAULT NULL,
Expand Down Expand Up @@ -715,6 +716,42 @@ CREATE TABLE `repeat_feature` (
KEY `analysis_idx` (`analysis_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 MAX_ROWS=100000000 AVG_ROW_LENGTH=80 CHECKSUM=1;

CREATE TABLE `rnaproduct` (
`rnaproduct_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`rnaproduct_type_id` smallint(5) unsigned NOT NULL,
`transcript_id` int(10) unsigned NOT NULL,
`seq_start` int(10) NOT NULL,
`start_exon_id` int(10) unsigned DEFAULT NULL,
`seq_end` int(10) NOT NULL,
`end_exon_id` int(10) unsigned DEFAULT NULL,
`stable_id` varchar(128) DEFAULT NULL,
`version` smallint(5) unsigned DEFAULT NULL,
`created_date` datetime DEFAULT NULL,
`modified_date` datetime DEFAULT NULL,
PRIMARY KEY (`rnaproduct_id`),
KEY `transcript_idx` (`transcript_id`),
KEY `stable_id_idx` (`stable_id`,`version`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `rnaproduct_attrib` (
`rnaproduct_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` text NOT NULL,
UNIQUE KEY `rnaproduct_attribx` (`rnaproduct_id`,`attrib_type_id`,`value`(500)),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40)),
KEY `rnaproduct_idx` (`rnaproduct_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `rnaproduct_type` (
`rnaproduct_type_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(20) NOT NULL DEFAULT '',
`name` varchar(255) NOT NULL DEFAULT '',
`description` text,
PRIMARY KEY (`rnaproduct_type_id`),
UNIQUE KEY `code_idx` (`code`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `seq_region` (
`seq_region_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
Expand Down Expand Up @@ -773,7 +810,7 @@ CREATE TABLE `stable_id_event` (
`new_stable_id` varchar(128) DEFAULT NULL,
`new_version` smallint(6) DEFAULT NULL,
`mapping_session_id` int(10) unsigned NOT NULL DEFAULT '0',
`type` enum('gene','transcript','translation') NOT NULL,
`type` enum('gene','transcript','translation','rnaproduct') NOT NULL,
`score` float NOT NULL DEFAULT '0',
UNIQUE KEY `uni_idx` (`mapping_session_id`,`old_stable_id`,`new_stable_id`,`type`),
KEY `new_idx` (`new_stable_id`),
Expand Down
7 changes: 6 additions & 1 deletion t/test-genome-DBs/drosophila_melanogaster/core/meta.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
1 \N schema_type core
2 \N schema_version 96
2 \N schema_version 97
3 \N patch patch_76_77_a.sql|schema_version
4 1 assembly.mapping chromosome:BDGP6|contig:BDGP6
5 1 assembly.mapping contig:BDGP6|chunk:BDGP6
Expand Down Expand Up @@ -129,3 +129,8 @@
219 \N patch patch_94_95_a.sql|schema_version
220 \N patch patch_94_95_b.sql|vertebrate_division_rename
221 \N patch patch_95_96_a.sql|schema_version
222 \N patch patch_96_97_a.sql|schema_version
223 \N patch patch_96_97_b.sql|biotype_so_term
224 \N patch patch_96_97_c.sql|rnaproduct_tables
225 \N patch patch_96_97_d.sql|add_object_type_rnaproduct
226 \N patch patch_96_97_e.sql|add_stable_id_event_type_rnaproduct
43 changes: 40 additions & 3 deletions t/test-genome-DBs/drosophila_melanogaster/core/table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ CREATE TABLE `biotype` (
`description` text,
`biotype_group` enum('coding','pseudogene','snoncoding','lnoncoding','mnoncoding','LRG','undefined','no_group') DEFAULT NULL,
`so_acc` varchar(64) DEFAULT NULL,
`so_term` varchar(1023) DEFAULT NULL,
PRIMARY KEY (`biotype_id`),
UNIQUE KEY `name_type_idx` (`name`,`object_type`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Expand Down Expand Up @@ -489,7 +490,7 @@ CREATE TABLE `meta` (
PRIMARY KEY (`meta_id`),
UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`),
KEY `species_value_idx` (`species_id`,`meta_value`)
) ENGINE=MyISAM AUTO_INCREMENT=222 DEFAULT CHARSET=latin1 CHECKSUM=1;
) ENGINE=MyISAM AUTO_INCREMENT=227 DEFAULT CHARSET=latin1 CHECKSUM=1;

CREATE TABLE `meta_coord` (
`table_name` varchar(40) NOT NULL,
Expand Down Expand Up @@ -538,7 +539,7 @@ CREATE TABLE `misc_set` (
CREATE TABLE `object_xref` (
`object_xref_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`ensembl_id` int(10) unsigned NOT NULL,
`ensembl_object_type` enum('RawContig','Transcript','Gene','Translation','Operon','OperonTranscript','Marker') NOT NULL,
`ensembl_object_type` enum('RawContig','Transcript','Gene','Translation','Operon','OperonTranscript','Marker','RNAProduct') NOT NULL,
`xref_id` int(10) unsigned NOT NULL,
`linkage_annotation` varchar(255) DEFAULT NULL,
`analysis_id` smallint(5) unsigned DEFAULT NULL,
Expand Down Expand Up @@ -715,6 +716,42 @@ CREATE TABLE `repeat_feature` (
KEY `analysis_idx` (`analysis_id`)
) ENGINE=MyISAM AUTO_INCREMENT=679834 DEFAULT CHARSET=latin1 MAX_ROWS=100000000 AVG_ROW_LENGTH=80 CHECKSUM=1;

CREATE TABLE `rnaproduct` (
`rnaproduct_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`rnaproduct_type_id` smallint(5) unsigned NOT NULL,
`transcript_id` int(10) unsigned NOT NULL,
`seq_start` int(10) NOT NULL,
`start_exon_id` int(10) unsigned DEFAULT NULL,
`seq_end` int(10) NOT NULL,
`end_exon_id` int(10) unsigned DEFAULT NULL,
`stable_id` varchar(128) DEFAULT NULL,
`version` smallint(5) unsigned DEFAULT NULL,
`created_date` datetime DEFAULT NULL,
`modified_date` datetime DEFAULT NULL,
PRIMARY KEY (`rnaproduct_id`),
KEY `transcript_idx` (`transcript_id`),
KEY `stable_id_idx` (`stable_id`,`version`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `rnaproduct_attrib` (
`rnaproduct_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` text NOT NULL,
UNIQUE KEY `rnaproduct_attribx` (`rnaproduct_id`,`attrib_type_id`,`value`(500)),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40)),
KEY `rnaproduct_idx` (`rnaproduct_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `rnaproduct_type` (
`rnaproduct_type_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(20) NOT NULL DEFAULT '',
`name` varchar(255) NOT NULL DEFAULT '',
`description` text,
PRIMARY KEY (`rnaproduct_type_id`),
UNIQUE KEY `code_idx` (`code`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `seq_region` (
`seq_region_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
Expand Down Expand Up @@ -773,7 +810,7 @@ CREATE TABLE `stable_id_event` (
`new_stable_id` varchar(128) DEFAULT NULL,
`new_version` smallint(6) DEFAULT NULL,
`mapping_session_id` int(10) unsigned NOT NULL DEFAULT '0',
`type` enum('gene','transcript','translation') NOT NULL,
`type` enum('gene','transcript','translation','rnaproduct') NOT NULL,
`score` float NOT NULL DEFAULT '0',
UNIQUE KEY `uni_idx` (`mapping_session_id`,`old_stable_id`,`new_stable_id`,`type`),
KEY `new_idx` (`new_stable_id`),
Expand Down
7 changes: 6 additions & 1 deletion t/test-genome-DBs/homo_sapiens/core/meta.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
1 \N schema_type core
2 \N schema_version 96
2 \N schema_version 97
3 \N patch patch_73_74_a.sql|schema_version
4 \N patch patch_73_74_b.sql|remove_dnac
5 \N patch patch_73_74_c.sql|remove_unconventional_transcript_association
Expand Down Expand Up @@ -176,3 +176,8 @@
5871 1 species.classification Opisthokonta
5872 1 species.classification Eukaryota
5877 \N patch patch_95_96_a.sql|schema_version
5878 \N patch patch_96_97_a.sql|schema_version
5879 \N patch patch_96_97_b.sql|biotype_so_term
5880 \N patch patch_96_97_c.sql|rnaproduct_tables
5881 \N patch patch_96_97_d.sql|add_object_type_rnaproduct
5882 \N patch patch_96_97_e.sql|add_stable_id_event_type_rnaproduct
43 changes: 40 additions & 3 deletions t/test-genome-DBs/homo_sapiens/core/table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ CREATE TABLE `biotype` (
`description` text,
`biotype_group` enum('coding','pseudogene','snoncoding','lnoncoding','mnoncoding','LRG','undefined','no_group') DEFAULT NULL,
`so_acc` varchar(64) DEFAULT NULL,
`so_term` varchar(1023) DEFAULT NULL,
PRIMARY KEY (`biotype_id`),
UNIQUE KEY `name_type_idx` (`name`,`object_type`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Expand Down Expand Up @@ -489,7 +490,7 @@ CREATE TABLE `meta` (
PRIMARY KEY (`meta_id`),
UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`),
KEY `species_value_idx` (`species_id`,`meta_value`)
) ENGINE=MyISAM AUTO_INCREMENT=5878 DEFAULT CHARSET=latin1;
) ENGINE=MyISAM AUTO_INCREMENT=5883 DEFAULT CHARSET=latin1;

CREATE TABLE `meta_coord` (
`table_name` varchar(40) NOT NULL,
Expand Down Expand Up @@ -538,7 +539,7 @@ CREATE TABLE `misc_set` (
CREATE TABLE `object_xref` (
`object_xref_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`ensembl_id` int(10) unsigned NOT NULL,
`ensembl_object_type` enum('RawContig','Transcript','Gene','Translation','Operon','OperonTranscript','Marker') NOT NULL,
`ensembl_object_type` enum('RawContig','Transcript','Gene','Translation','Operon','OperonTranscript','Marker','RNAProduct') NOT NULL,
`xref_id` int(10) unsigned NOT NULL,
`linkage_annotation` varchar(255) DEFAULT NULL,
`analysis_id` smallint(5) unsigned DEFAULT NULL,
Expand Down Expand Up @@ -715,6 +716,42 @@ CREATE TABLE `repeat_feature` (
KEY `analysis_idx` (`analysis_id`)
) ENGINE=MyISAM AUTO_INCREMENT=17281504 DEFAULT CHARSET=latin1 MAX_ROWS=100000000 AVG_ROW_LENGTH=80;

CREATE TABLE `rnaproduct` (
`rnaproduct_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`rnaproduct_type_id` smallint(5) unsigned NOT NULL,
`transcript_id` int(10) unsigned NOT NULL,
`seq_start` int(10) NOT NULL,
`start_exon_id` int(10) unsigned DEFAULT NULL,
`seq_end` int(10) NOT NULL,
`end_exon_id` int(10) unsigned DEFAULT NULL,
`stable_id` varchar(128) DEFAULT NULL,
`version` smallint(5) unsigned DEFAULT NULL,
`created_date` datetime DEFAULT NULL,
`modified_date` datetime DEFAULT NULL,
PRIMARY KEY (`rnaproduct_id`),
KEY `transcript_idx` (`transcript_id`),
KEY `stable_id_idx` (`stable_id`,`version`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `rnaproduct_attrib` (
`rnaproduct_id` int(10) unsigned NOT NULL DEFAULT '0',
`attrib_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`value` text NOT NULL,
UNIQUE KEY `rnaproduct_attribx` (`rnaproduct_id`,`attrib_type_id`,`value`(500)),
KEY `type_val_idx` (`attrib_type_id`,`value`(40)),
KEY `val_only_idx` (`value`(40)),
KEY `rnaproduct_idx` (`rnaproduct_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `rnaproduct_type` (
`rnaproduct_type_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(20) NOT NULL DEFAULT '',
`name` varchar(255) NOT NULL DEFAULT '',
`description` text,
PRIMARY KEY (`rnaproduct_type_id`),
UNIQUE KEY `code_idx` (`code`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `seq_region` (
`seq_region_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
Expand Down Expand Up @@ -773,7 +810,7 @@ CREATE TABLE `stable_id_event` (
`new_stable_id` varchar(128) DEFAULT NULL,
`new_version` smallint(6) DEFAULT NULL,
`mapping_session_id` int(10) unsigned NOT NULL DEFAULT '0',
`type` enum('gene','transcript','translation') NOT NULL,
`type` enum('gene','transcript','translation','rnaproduct') NOT NULL,
`score` float NOT NULL DEFAULT '0',
UNIQUE KEY `uni_idx` (`mapping_session_id`,`old_stable_id`,`new_stable_id`,`type`),
KEY `new_idx` (`new_stable_id`),
Expand Down
9 changes: 8 additions & 1 deletion t/test-genome-DBs/homo_sapiens/funcgen/meta.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
1 1 schema_type funcgen
2 \N schema_version 96
2 \N schema_version 97
3 \N patch patch_87_88_a.sql|schema_version
4 \N patch patch_87_88_b.sql|seq_region_name_255
5 \N patch patch_87_88_c.sql|sample_regulatory_feature_id field for regulatory build
Expand Down Expand Up @@ -115,3 +115,10 @@
115 \N patch patch_95_96_d.sql|add ReadFile to the enum of the ensembl_object_type
116 \N patch patch_95_96_e.sql|Add description and release_version columns to regulatory_build table
117 \N patch patch_95_96_f.sql|Modify binding_matrix_table
118 \N patch patch_96_97_a.sql|schema_version
119 \N patch patch_96_97_b.sql|Changed to text
120 \N patch patch_96_97_c.sql|Added flag
121 \N patch patch_96_97_d.sql|Fix foreign key data type inconsistencies
122 \N patch patch_96_97_e.sql|Update mirna_target_feature
123 \N patch patch_96_97_f.sql|Add search_terms and full_name columns to epigenome table, rename display_label column to short_name and change description to TEXT
124 \N patch patch_96_97_g.sql|Modify column in regulatory_activity

0 comments on commit ce67d50

Please sign in to comment.