diff --git a/modules/t/test-genome-DBs/homo_sapiens/core/intron_supporting_evidence.sql b/modules/t/test-genome-DBs/homo_sapiens/core/intron_supporting_evidence.sql new file mode 100644 index 0000000000000000000000000000000000000000..f50e44cc781b0dcfba17fcca723bccdd2ef90ee2 --- /dev/null +++ b/modules/t/test-genome-DBs/homo_sapiens/core/intron_supporting_evidence.sql @@ -0,0 +1,15 @@ +CREATE TABLE intron_supporting_evidence ( +intron_supporting_evidence_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, +analysis_id SMALLINT UNSIGNED NOT NULL, +seq_region_id INT(10) UNSIGNED NOT NULL, +seq_region_start INT(10) UNSIGNED NOT NULL, +seq_region_end INT(10) UNSIGNED NOT NULL, +seq_region_strand TINYINT(2) NOT NULL, +hit_name VARCHAR(100) NOT NULL, +score DECIMAL(10,3), +score_type ENUM('NONE', 'DEPTH') DEFAULT 'NONE', + +PRIMARY KEY (intron_supporting_evidence_id), + +UNIQUE KEY (analysis_id, seq_region_id, seq_region_start, seq_region_end, seq_region_strand, hit_name) +) COLLATE=latin1_swedish_ci ENGINE=MyISAM; diff --git a/sql/patch_67_68_c.sql b/sql/patch_67_68_c.sql new file mode 100644 index 0000000000000000000000000000000000000000..255ef0afa386e2ff33d7b58ea71788435c92e2c1 --- /dev/null +++ b/sql/patch_67_68_c.sql @@ -0,0 +1,39 @@ +# patch_67_68_c.sql +# +# Title: Altering intron_supporting_evidence table +# +# Description: Introns can be supported by an external feature. This gives a +# weight to how much we believe the intron and allows the attachement to +# a transcript whilst letting the intron exist on its own and +# queryable by location +# + +DROP TABLE intron_supporting_evidence; + +CREATE TABLE intron_supporting_evidence ( +intron_supporting_evidence_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, +analysis_id SMALLINT UNSIGNED NOT NULL, +seq_region_id INT(10) UNSIGNED NOT NULL, +seq_region_start INT(10) UNSIGNED NOT NULL, +seq_region_end INT(10) UNSIGNED NOT NULL, +seq_region_strand TINYINT(2) NOT NULL, +hit_name VARCHAR(100) NOT NULL, +score DECIMAL(10,3), +score_type ENUM('NONE', 'DEPTH') DEFAULT 'NONE', + +PRIMARY KEY (intron_supporting_evidence_id), + +UNIQUE KEY (analysis_id, seq_region_id, seq_region_start, seq_region_end, seq_region_strand, hit_name) +) COLLATE=latin1_swedish_ci ENGINE=MyISAM; + +CREATE TABLE transcript_intron_supporting_evidence ( +transcript_id INT(10) UNSIGNED NOT NULL, +intron_supporting_evidence_id INT(10) UNSIGNED NOT NULL, +previous_exon_id INT(10) UNSIGNED NOT NULL, +next_exon_id INT(10) UNSIGNED NOT NULL, +PRIMARY KEY (intron_supporting_evidence_id, transcript_id) +) COLLATE=latin1_swedish_ci ENGINE=MyISAM; + +# Patch identifier: +INSERT INTO meta (species_id, meta_key, meta_value) + VALUES (NULL, 'patch', 'patch_67_68_c.sql|altering_intron_supporting_evidence'); \ No newline at end of file diff --git a/sql/table.sql b/sql/table.sql index f43e61ef195d620c5daa9c27d19537c57c8d678f..417c8b787eacf40165c8384e8a4752a7de03410b 100755 --- a/sql/table.sql +++ b/sql/table.sql @@ -292,7 +292,7 @@ score_type ENUM('NONE', 'DEPTH') DEFAULT 'NONE', PRIMARY KEY (intron_supporting_evidence_id), -UNIQUE KEY (analysis_id, seq_region_id, seq_region_start, seq_reigon_end, seq_region_strand, hit_name) +UNIQUE KEY (analysis_id, seq_region_id, seq_region_start, seq_region_end, seq_region_strand, hit_name) ) COLLATE=latin1_swedish_ci ENGINE=MyISAM; /**