Commit 733760f8 authored by Marek Szuba's avatar Marek Szuba
Browse files

Patch test databases for RNAPRoduct tests

Apply patch_96_97_{c,d,e}, insert the necessary data into
homo_sapiens/core.
parent af5a5c4e
--
-- Created by SQL::Translator::Producer::SQLite
-- Created on Tue Feb 12 15:00:19 2019
-- Created on Mon Mar 18 14:30:07 2019
--
BEGIN TRANSACTION;
......@@ -615,7 +615,7 @@ CREATE UNIQUE INDEX "code_idx02" ON "misc_set" ("code");
CREATE TABLE "object_xref" (
"object_xref_id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
"ensembl_id" integer NOT NULL DEFAULT 0,
"ensembl_object_type" enum NOT NULL DEFAULT 'RawContig',
"ensembl_object_type" enum NOT NULL,
"xref_id" integer NOT NULL,
"linkage_annotation" varchar(255),
"analysis_id" smallint
......@@ -787,6 +787,46 @@ CREATE TABLE "repeat_feature" (
"score" double precision
);
--
-- Table: "rnaproduct"
--
CREATE TABLE "rnaproduct" (
"rnaproduct_id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
"rnaproduct_type_id" smallint NOT NULL,
"transcript_id" integer NOT NULL,
"seq_start" integer NOT NULL,
"start_exon_id" integer,
"seq_end" integer NOT NULL,
"end_exon_id" integer,
"stable_id" varchar(128),
"version" smallint,
"created_date" datetime,
"modified_date" datetime
);
--
-- Table: "rnaproduct_attrib"
--
CREATE TABLE "rnaproduct_attrib" (
"rnaproduct_id" integer NOT NULL DEFAULT 0,
"attrib_type_id" smallint NOT NULL DEFAULT 0,
"value" text NOT NULL
);
CREATE UNIQUE INDEX "rnaproduct_attribx" ON "rnaproduct_attrib" ("rnaproduct_id", "attrib_type_id", "value");
--
-- Table: "rnaproduct_type"
--
CREATE TABLE "rnaproduct_type" (
"rnaproduct_type_id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
"code" varchar(20) NOT NULL DEFAULT '',
"name" varchar(255) NOT NULL DEFAULT '',
"description" text
);
CREATE UNIQUE INDEX "code_idx03" ON "rnaproduct_type" ("code");
--
-- Table: "seq_region"
--
......@@ -854,7 +894,7 @@ CREATE TABLE "stable_id_event" (
"new_stable_id" varchar(128),
"new_version" smallint,
"mapping_session_id" integer NOT NULL DEFAULT 0,
"type" enum NOT NULL DEFAULT 'gene',
"type" enum NOT NULL,
"score" float NOT NULL DEFAULT 0
);
......
......@@ -19,3 +19,4 @@
19 karyotype_rank Rank in the karyotype For a given seq_region, if it is part of the species karyotype, will indicate its rank
20 proj_parent_g projection parent gene Stable identifier of the parent gene this gene was projected from (projection between different species and/or assemblies).
21 proj_parent_t projection parent transcript Stable identifier of the parent transcript this transcript was projected from (projection between different species and/or assemblies).
22 mirna_arm miRNA arm Hairpin arm from which this miRNA has come from
......@@ -107,3 +107,6 @@
174 \N patch patch_95_96_a.sql|schema_version
175 \N patch patch_96_97_a.sql|schema_version
176 \N patch patch_96_97_b.sql|biotype_so_term
177 \N patch patch_96_97_c.sql|rnaproduct_tables
178 \N patch patch_96_97_d.sql|add_object_type_rnaproduct
179 \N patch patch_96_97_e.sql|add_stable_id_event_type_rnaproduct
......@@ -203,3 +203,5 @@
253682 21727 Translation 168444 119 0
253683 21727 Translation 168445 119 0
253684 21727 Translation 168446 119 0
999998 1 RNAProduct 123456 \N 0
999999 2 RNAProduct 123457 \N 0
1 2 21717 46 162035 67 162035 ENSM00000000001 1 2018-05-14 12:00:00 2018-05-14 12:00:00
2 2 21717 7 \N 28 \N ENSM00000000002 1 2018-05-21 17:00:00 2018-05-21 17:00:00
1 10 Placeholder
1 22 3
2 10 Placeholder
2 22 5
1 generic generic Generic mature RNA
2 miRNA microRNA Mature microRNA strand
3 circRNA Circular RNA \N
131538 20 4 64444167
368744 AL359765.6.1.13780 4 13780
317101 AL031658.11.1.162976 4 162976
339816 AL353092.6.1.25010 4 25010
......
......@@ -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=177 DEFAULT CHARSET=latin1;
) ENGINE=MyISAM AUTO_INCREMENT=180 DEFAULT CHARSET=latin1;
CREATE TABLE `meta_coord` (
`table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '',
......@@ -539,7 +539,7 @@ CREATE TABLE `misc_set` (
CREATE TABLE `object_xref` (
`object_xref_id` int(11) NOT NULL AUTO_INCREMENT,
`ensembl_id` int(10) unsigned NOT NULL DEFAULT '0',
`ensembl_object_type` enum('RawContig','Transcript','Gene','Translation','regulatory_factor','regulatory_feature','Marker') COLLATE latin1_bin NOT NULL DEFAULT 'RawContig',
`ensembl_object_type` enum('RawContig','Transcript','Gene','Translation','Operon','OperonTranscript','Marker','RNAProduct') COLLATE latin1_bin NOT NULL,
`xref_id` int(10) unsigned NOT NULL,
`linkage_annotation` varchar(255) COLLATE latin1_bin DEFAULT NULL,
`analysis_id` smallint(5) unsigned DEFAULT NULL,
......@@ -547,7 +547,7 @@ CREATE TABLE `object_xref` (
UNIQUE KEY `xref_idx` (`xref_id`,`ensembl_object_type`,`ensembl_id`),
KEY `ensembl_idx` (`ensembl_object_type`,`ensembl_id`),
KEY `analysis_idx` (`analysis_id`)
) ENGINE=MyISAM AUTO_INCREMENT=253694 DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
) ENGINE=MyISAM AUTO_INCREMENT=1000000 DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
CREATE TABLE `ontology_xref` (
`object_xref_id` int(10) unsigned NOT NULL DEFAULT '0',
......@@ -716,6 +716,42 @@ CREATE TABLE `repeat_feature` (
KEY `analysis_idx` (`analysis_id`)
) ENGINE=MyISAM AUTO_INCREMENT=922516 DEFAULT CHARSET=latin1 COLLATE=latin1_bin 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 AUTO_INCREMENT=3 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 AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
CREATE TABLE `seq_region` (
`seq_region_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE latin1_bin NOT NULL,
......@@ -774,7 +810,7 @@ CREATE TABLE `stable_id_event` (
`new_stable_id` varchar(128) COLLATE latin1_bin DEFAULT NULL,
`new_version` smallint(6) DEFAULT NULL,
`mapping_session_id` int(10) NOT NULL DEFAULT '0',
`type` enum('gene','transcript','translation') COLLATE latin1_bin NOT NULL DEFAULT 'gene',
`type` enum('gene','transcript','translation','rnaproduct') COLLATE latin1_bin NOT NULL,
`score` float NOT NULL DEFAULT '0',
UNIQUE KEY `uni_idx` (`mapping_session_id`,`old_stable_id`,`old_version`,`new_stable_id`,`new_version`,`type`),
KEY `new_idx` (`new_stable_id`),
......
......@@ -181,5 +181,7 @@
103296 2 U24166 U24166 1 description D
103297 3 AAC09471 AAC09471 1 description D
103298 3 CAB53072 CAB53072 1 description D
123456 3300 MIMAT0000416 hsa-miR-1-3p 1 description D
123457 3300 MIMAT0031892 hsa-miR-1-5p 1 description D
999998 11 IPR000001 IPR000001 1 Test interpro desc1 D
999999 11 IPR000010 IPR000010 1 Test interpro desc2 D
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment