Skip to content
Snippets Groups Projects
Commit 77169577 authored by Andy Yates's avatar Andy Yates
Browse files

Ensembl core is now at v65. Patches to work with flat file handles in core...

Ensembl core is now at v65. Patches to work with flat file handles in core like databases and supporting checksum derived xrefs
parent 16824a3e
No related branches found
No related tags found
No related merge requests found
......@@ -46,7 +46,7 @@ use base qw( Exporter );
our @EXPORT = qw( software_version );
my $API_VERSION = 64;
my $API_VERSION = 65;
sub software_version { return $API_VERSION }
......
......@@ -52,17 +52,17 @@ DROP TABLE translation_stable_id;
DROP TABLE transcript_stable_id;
CREATE VIEW exon_stable_id (exon_id, stable_id, version, created_date, modified_date) AS (SELECT exon_id, stable_id, version, created_date, modified_date FROM exon);
CREATE DEFINER = CURRENT_USER SQL SECURITY INVOKER VIEW exon_stable_id (exon_id, stable_id, version, created_date, modified_date) AS (SELECT exon_id, stable_id, version, created_date, modified_date FROM exon);
CREATE VIEW gene_stable_id (gene_id, stable_id, version, created_date, modified_date) AS (SELECT gene_id, stable_id, version, created_date, modified_date FROM gene);
CREATE DEFINER = CURRENT_USER SQL SECURITY INVOKER VIEW gene_stable_id (gene_id, stable_id, version, created_date, modified_date) AS (SELECT gene_id, stable_id, version, created_date, modified_date FROM gene);
CREATE VIEW operon_stable_id (operon_id, stable_id, version, created_date, modified_date) AS (SELECT operon_id, stable_id, version, created_date, modified_date FROM operon);
CREATE DEFINER = CURRENT_USER SQL SECURITY INVOKER VIEW operon_stable_id (operon_id, stable_id, version, created_date, modified_date) AS (SELECT operon_id, stable_id, version, created_date, modified_date FROM operon);
CREATE VIEW operon_transcript_stable_id (operon_transcript_id, stable_id, version, created_date, modified_date) AS (SELECT operon_transcript_id, stable_id, version, created_date, modified_date FROM operon_transcript);
CREATE DEFINER = CURRENT_USER SQL SECURITY INVOKER VIEW operon_transcript_stable_id (operon_transcript_id, stable_id, version, created_date, modified_date) AS (SELECT operon_transcript_id, stable_id, version, created_date, modified_date FROM operon_transcript);
CREATE VIEW translation_stable_id (translation_id, stable_id, version, created_date, modified_date) AS (SELECT translation_id, stable_id, version, created_date, modified_date FROM translation);
CREATE DEFINER = CURRENT_USER SQL SECURITY INVOKER VIEW translation_stable_id (translation_id, stable_id, version, created_date, modified_date) AS (SELECT translation_id, stable_id, version, created_date, modified_date FROM translation);
CREATE VIEW transcript_stable_id (transcript_id, stable_id, version, created_date, modified_date) AS (SELECT transcript_id, stable_id, version, created_date, modified_date FROM transcript);
CREATE DEFINER = CURRENT_USER SQL SECURITY INVOKER VIEW transcript_stable_id (transcript_id, stable_id, version, created_date, modified_date) AS (SELECT transcript_id, stable_id, version, created_date, modified_date FROM transcript);
# Patch identifier
......
# patch_62_63_c.sql
#
# Title: New table for file location storage
#
# Description:
# We now record the location of an external file to be used by the website
# for display. This is primarily for BAM data but we will extend this
# for other formats.
CREATE TABLE data_file (
data_file_id int(11) unsigned NOT NULL AUTO_INCREMENT,
coord_system_id int(11) NOT NULL,
analysis_id int(11) NOT NULL,
name varchar(100) NOT NULL,
version_lock tinyint(1) DEFAULT 0 NOT NULL,
absolute tinyint(1) DEFAULT 0 NOT NULL,
url text,
file_type enum('BAM','BIGBED','BIGWIG','VCF'),
PRIMARY KEY (data_file_id),
UNIQUE KEY df_unq_idx(coord_system_id, analysis_id, name, file_type),
INDEX df_name_idx(name),
INDEX df_analysis_idx(analysis_id)
);
# Patch identifier
INSERT INTO meta (species_id, meta_key, meta_value)
VALUES (NULL, 'patch', 'patch_64_65_c.sql|add_data_file');
# patch_62_63_d.sql
#
# Title: Add new Xref info_type
#
# Description:
# We can now do checksum mapping in the Xref pipeline so Xrefs need to reflect
# this
ALTER TABLE xref modify COLUMN info_type ENUM(
'PROJECTION', 'MISC', 'DEPENDENT',
'DIRECT', 'SEQUENCE_MATCH',
'INFERRED_PAIR', 'PROBE',
'UNMAPPED', 'COORDINATE_OVERLAP',
'CHECKSUM');
# Patch identifier
INSERT INTO meta (species_id, meta_key, meta_value)
VALUES (NULL, 'patch', 'patch_64_65_d.sql|add_checksum_info_type');
......@@ -447,7 +447,9 @@ INSERT INTO meta (species_id, meta_key, meta_value) VALUES
# NOTE: Avoid line-breaks in values.
INSERT INTO meta (species_id, meta_key, meta_value) VALUES
(NULL, 'patch', 'patch_64_65_a.sql|schema_version'),
(NULL, 'patch', 'patch_64_65_b.sql|merge_stable_id_with_object');
(NULL, 'patch', 'patch_64_65_b.sql|merge_stable_id_with_object'),
(NULL, 'patch', 'patch_64_65_c.sql|add_data_file'),
(NULL, 'patch', 'patch_64_65_d.sql|add_checksum_info_type');
/**
@table meta_coord
......@@ -2485,15 +2487,43 @@ CREATE TABLE interpro (
) COLLATE=latin1_swedish_ci ENGINE=MyISAM;
/**
@table data_file
@desc Allows the storage of flat file locations used to store large quanitities of data currently unsuitable in a traditional database table.
@column data_file_id Auto-increment surrogate primary key
@column coord_system_id Coordinate system this file is linked to. Used to decipher the assembly version it was mapped to
@column analysis_id Analysis this file is linked to
@column name Name of the file
@column version_lock Indicates that this file is only compatible with the current Ensembl release version
@column absolute Flags that the URL given is fully resolved and should be used without question
@column url Optional path to the file (can be absolute or relative)
@column file_type Type of file e.g. BAM, BIGBED, BIGWIG and VCF
*/
CREATE TABLE data_file (
data_file_id int(11) unsigned NOT NULL AUTO_INCREMENT,
coord_system_id int(11) NOT NULL,
analysis_id int(11) NOT NULL,
name varchar(100) NOT NULL,
version_lock tinyint(1) DEFAULT 0 NOT NULL,
absolute tinyint(1) DEFAULT 0 NOT NULL,
url text,
file_type enum('BAM','BIGBED','BIGWIG','VCF'),
PRIMARY KEY (data_file_id),
UNIQUE KEY df_unq_idx(coord_system_id, analysis_id, name, file_type),
INDEX df_name_idx(name),
INDEX df_analysis_idx(analysis_id)
);
CREATE VIEW exon_stable_id (exon_id, stable_id, version, created_date, modified_date) AS (SELECT exon_id, stable_id, version, created_date, modified_date FROM exon);
CREATE DEFINER = CURRENT_USER SQL SECURITY INVOKER VIEW exon_stable_id (exon_id, stable_id, version, created_date, modified_date) AS (SELECT exon_id, stable_id, version, created_date, modified_date FROM exon);
CREATE VIEW gene_stable_id (gene_id, stable_id, version, created_date, modified_date) AS (SELECT gene_id, stable_id, version, created_date, modified_date FROM gene);
CREATE DEFINER = CURRENT_USER SQL SECURITY INVOKER VIEW gene_stable_id (gene_id, stable_id, version, created_date, modified_date) AS (SELECT gene_id, stable_id, version, created_date, modified_date FROM gene);
CREATE VIEW operon_stable_id (operon_id, stable_id, version, created_date, modified_date) AS (SELECT operon_id, stable_id, version, created_date, modified_date FROM operon);
CREATE DEFINER = CURRENT_USER SQL SECURITY INVOKER VIEW operon_stable_id (operon_id, stable_id, version, created_date, modified_date) AS (SELECT operon_id, stable_id, version, created_date, modified_date FROM operon);
CREATE VIEW operon_transcript_stable_id (operon_transcript_id, stable_id, version, created_date, modified_date) AS (SELECT operon_transcript_id, stable_id, version, created_date, modified_date FROM operon_transcript);
CREATE DEFINER = CURRENT_USER SQL SECURITY INVOKER VIEW operon_transcript_stable_id (operon_transcript_id, stable_id, version, created_date, modified_date) AS (SELECT operon_transcript_id, stable_id, version, created_date, modified_date FROM operon_transcript);
CREATE VIEW translation_stable_id (translation_id, stable_id, version, created_date, modified_date) AS (SELECT translation_id, stable_id, version, created_date, modified_date FROM translation);
CREATE DEFINER = CURRENT_USER SQL SECURITY INVOKER VIEW translation_stable_id (translation_id, stable_id, version, created_date, modified_date) AS (SELECT translation_id, stable_id, version, created_date, modified_date FROM translation);
CREATE VIEW transcript_stable_id (transcript_id, stable_id, version, created_date, modified_date) AS (SELECT transcript_id, stable_id, version, created_date, modified_date FROM transcript);
CREATE DEFINER = CURRENT_USER SQL SECURITY INVOKER VIEW transcript_stable_id (transcript_id, stable_id, version, created_date, modified_date) AS (SELECT transcript_id, stable_id, version, created_date, modified_date FROM transcript);
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