Skip to content

Commit

Permalink
Merge pull request #52 from Ensembl/103_testdbpatch
Browse files Browse the repository at this point in the history
103 test db patch
  • Loading branch information
Ameya Chaubal authored and mira13 committed Aug 11, 2020
2 parents c3eaeb8 + 1daa449 commit cdadb4b
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 22 deletions.
3 changes: 2 additions & 1 deletion modules/t/test-genome-DBs/homo_sapiens/core/meta.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1 \N schema_version 102
1 \N schema_version 103
2 1 assembly.default NCBI34
3 1 species.taxonomy_id 9606
26 1 species.classification Homo sapiens
Expand Down Expand Up @@ -117,3 +117,4 @@
191 \N patch patch_99_100_c.sql|alter_mapping_session_assembly_length
192 \N patch patch_100_101_a.sql|schema_version
193 \N patch patch_101_102_a.sql|schema_version
194 \N patch patch_102_103_a.sql|schema_version
2 changes: 1 addition & 1 deletion modules/t/test-genome-DBs/homo_sapiens/core/table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -490,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=194 DEFAULT CHARSET=latin1;
) ENGINE=MyISAM AUTO_INCREMENT=195 DEFAULT CHARSET=latin1;

CREATE TABLE `meta_coord` (
`table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '',
Expand Down
5 changes: 4 additions & 1 deletion modules/t/test-genome-DBs/multi/compara/meta.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
79 \N schema_version 102
83 \N schema_version 103
2 \N schema_type compara
3 \N patch patch_84_85_a.sql|schema_version
4 \N patch patch_84_85_b.sql|gene_tree_root_attr
Expand Down Expand Up @@ -63,3 +63,6 @@
77 \N patch patch_100_101_e.sql|positive_int
78 \N patch patch_100_101_f.sql|gab.direction
80 \N patch patch_101_102_a.sql|schema_version
81 \N patch patch_101_102_b.sql|enum_other
82 \N patch patch_101_102_c.sql|stn_node_id_bigint
84 \N patch patch_102_103_a.sql|schema_version
30 changes: 15 additions & 15 deletions modules/t/test-genome-DBs/multi/compara/table.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CREATE TABLE `CAFE_gene_family` (
`cafe_gene_family_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`root_id` int(10) unsigned NOT NULL,
`lca_id` int(10) unsigned NOT NULL,
`root_id` bigint(20) unsigned NOT NULL,
`lca_id` bigint(20) unsigned NOT NULL,
`gene_tree_root_id` int(10) unsigned NOT NULL,
`pvalue_avg` double(5,4) DEFAULT NULL,
`lambdas` varchar(100) DEFAULT NULL,
Expand All @@ -13,7 +13,7 @@ CREATE TABLE `CAFE_gene_family` (

CREATE TABLE `CAFE_species_gene` (
`cafe_gene_family_id` int(10) unsigned NOT NULL,
`node_id` int(10) unsigned NOT NULL,
`node_id` bigint(20) unsigned NOT NULL,
`n_members` int(4) unsigned NOT NULL,
`pvalue` double(5,4) DEFAULT NULL,
PRIMARY KEY (`cafe_gene_family_id`,`node_id`),
Expand Down Expand Up @@ -49,7 +49,7 @@ CREATE TABLE `dnafrag` (
`name` varchar(255) NOT NULL DEFAULT '',
`genome_db_id` int(10) unsigned NOT NULL,
`coord_system_name` varchar(40) NOT NULL DEFAULT '',
`cellular_component` enum('NUC','MT','PT') NOT NULL DEFAULT 'NUC',
`cellular_component` enum('NUC','MT','PT','OTHER') NOT NULL DEFAULT 'NUC',
`is_reference` tinyint(1) NOT NULL DEFAULT '1',
`codon_table_id` tinyint(2) unsigned NOT NULL DEFAULT '1',
PRIMARY KEY (`dnafrag_id`),
Expand Down Expand Up @@ -197,7 +197,7 @@ CREATE TABLE `gene_tree_node` (
CREATE TABLE `gene_tree_node_attr` (
`node_id` int(10) unsigned NOT NULL,
`node_type` enum('duplication','dubious','speciation','sub-speciation','gene_split') DEFAULT NULL,
`species_tree_node_id` int(10) unsigned DEFAULT NULL,
`species_tree_node_id` bigint(20) unsigned DEFAULT NULL,
`bootstrap` tinyint(3) unsigned DEFAULT NULL,
`duplication_confidence_score` double(5,4) DEFAULT NULL,
PRIMARY KEY (`node_id`),
Expand Down Expand Up @@ -225,7 +225,7 @@ CREATE TABLE `gene_tree_root` (
`tree_type` enum('clusterset','supertree','tree') NOT NULL,
`clusterset_id` varchar(20) NOT NULL DEFAULT 'default',
`method_link_species_set_id` int(10) unsigned NOT NULL,
`species_tree_root_id` int(10) unsigned DEFAULT NULL,
`species_tree_root_id` bigint(20) unsigned DEFAULT NULL,
`gene_align_id` int(10) unsigned DEFAULT NULL,
`ref_root_id` int(10) unsigned DEFAULT NULL,
`stable_id` varchar(40) DEFAULT NULL,
Expand Down Expand Up @@ -259,7 +259,7 @@ CREATE TABLE `gene_tree_root_attr` (
`tree_num_dup_nodes` int(10) unsigned DEFAULT NULL,
`tree_num_leaves` int(10) unsigned DEFAULT NULL,
`tree_num_spec_nodes` int(10) unsigned DEFAULT NULL,
`lca_node_id` int(10) unsigned DEFAULT NULL,
`lca_node_id` bigint(20) unsigned DEFAULT NULL,
`taxonomic_coverage` float DEFAULT NULL,
`ratio_species_genes` float DEFAULT NULL,
`model_name` varchar(40) DEFAULT NULL,
Expand Down Expand Up @@ -376,7 +376,7 @@ CREATE TABLE `homology` (
`n` float(10,1) DEFAULT NULL,
`s` float(10,1) DEFAULT NULL,
`lnl` float(10,3) DEFAULT NULL,
`species_tree_node_id` int(10) unsigned DEFAULT NULL,
`species_tree_node_id` bigint(20) unsigned DEFAULT NULL,
`gene_tree_node_id` int(10) unsigned DEFAULT NULL,
`gene_tree_root_id` int(10) unsigned DEFAULT NULL,
`goc_score` tinyint(3) unsigned DEFAULT NULL,
Expand Down Expand Up @@ -429,7 +429,7 @@ CREATE TABLE `meta` (
PRIMARY KEY (`meta_id`),
UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`(255)),
KEY `species_value_idx` (`species_id`,`meta_value`(255))
) ENGINE=MyISAM AUTO_INCREMENT=81 DEFAULT CHARSET=latin1;
) ENGINE=MyISAM AUTO_INCREMENT=85 DEFAULT CHARSET=latin1;

CREATE TABLE `method_link` (
`method_link_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
Expand Down Expand Up @@ -609,9 +609,9 @@ CREATE TABLE `species_set_tag` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `species_tree_node` (
`node_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`parent_id` int(10) unsigned DEFAULT NULL,
`root_id` int(10) unsigned DEFAULT NULL,
`node_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`parent_id` bigint(20) unsigned DEFAULT NULL,
`root_id` bigint(20) unsigned DEFAULT NULL,
`left_index` int(10) NOT NULL DEFAULT '0',
`right_index` int(10) NOT NULL DEFAULT '0',
`distance_to_parent` double DEFAULT '1',
Expand All @@ -626,7 +626,7 @@ CREATE TABLE `species_tree_node` (
) ENGINE=MyISAM AUTO_INCREMENT=40102221 DEFAULT CHARSET=latin1;

CREATE TABLE `species_tree_node_attr` (
`node_id` int(10) unsigned NOT NULL,
`node_id` bigint(20) unsigned NOT NULL,
`nb_long_genes` int(11) DEFAULT NULL,
`nb_short_genes` int(11) DEFAULT NULL,
`avg_dupscore` float DEFAULT NULL,
Expand Down Expand Up @@ -656,15 +656,15 @@ CREATE TABLE `species_tree_node_attr` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `species_tree_node_tag` (
`node_id` int(10) unsigned NOT NULL,
`node_id` bigint(20) unsigned NOT NULL,
`tag` varchar(50) NOT NULL,
`value` mediumtext NOT NULL,
KEY `node_id_tag` (`node_id`,`tag`),
KEY `tag` (`tag`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `species_tree_root` (
`root_id` int(10) unsigned NOT NULL,
`root_id` bigint(20) unsigned NOT NULL DEFAULT '0',
`method_link_species_set_id` int(10) unsigned NOT NULL,
`label` varchar(256) NOT NULL DEFAULT 'default',
PRIMARY KEY (`root_id`),
Expand Down
3 changes: 2 additions & 1 deletion modules/t/test-genome-DBs/mus_musculus/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 102
2 \N schema_version 103
3 \N patch patch_65_66_a.sql|schema_version
4 \N patch patch_65_66_b.sql|fix_external_db_id
5 \N patch patch_65_66_c.sql|reorder_unmapped_obj_index
Expand Down Expand Up @@ -195,3 +195,4 @@
1707 \N patch patch_99_100_c.sql|alter_mapping_session_assembly_length
1708 \N patch patch_100_101_a.sql|schema_version
1709 \N patch patch_101_102_a.sql|schema_version
1710 \N patch patch_102_103_a.sql|schema_version
2 changes: 1 addition & 1 deletion modules/t/test-genome-DBs/mus_musculus/core/table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -490,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=1710 DEFAULT CHARSET=latin1;
) ENGINE=MyISAM AUTO_INCREMENT=1711 DEFAULT CHARSET=latin1;

CREATE TABLE `meta_coord` (
`table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '',
Expand Down
5 changes: 3 additions & 2 deletions scripts/runtests.pl
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,15 @@

clean();

if($results->has_errors()) {
my $count = $results->failed();
$count += $results->parse_errors();
$count += $results->exit();
$count += $results->wait();
$count = 255 if $count > 255;
use Data::Dumper;
printf(Dumper($results));
printf($count)
exit $count;
}

sub usage {
print <<EOT;
Expand Down

0 comments on commit cdadb4b

Please sign in to comment.