Commit 94680230 authored by Patrick Meidl's avatar Patrick Meidl
Browse files

changes from branch-vega-35-dev

parent c92db13e
......@@ -2163,8 +2163,7 @@ sub get_all_SearchFeatures {
my $offset = $self->start-1;
my $features = $sfa ? $sfa->get_all_SearchFeatures($ticket, $self->chr_name, $self->start, $self->end) : [];
my $features = $sfa ? $sfa->get_all_SearchFeatures($ticket, $self->seq_region_name, $self->start, $self->end) : [];
foreach( @$features ) {
$_->start( $_->start - $offset );
......
......@@ -627,6 +627,7 @@ sub get_database {
evega => 'Bio::EnsEMBL::DBSQL::DBAdaptor',
otter => 'Bio::Otter::DBSQL::DBAdaptor',
vega => 'Bio::Otter::DBSQL::DBAdaptor',
compara => 'Bio::EnsEMBL::DBSQL::DBAdaptor',
);
my %valid = map { $_ => 1 } keys %adaptors;
throw("Unknown database: $database") unless $valid{$database};
......
......@@ -98,10 +98,6 @@ sub new {
'patch_sql');
$self->conv_support->confirm_params;
my $siteroot = $self->conv_support->serverroot;
$self->conv_support->param('vega_sql',$siteroot.$self->conv_support->param('vega_sql'));
$self->conv_support->param('core_sql',$siteroot.$self->conv_support->param('core_sql'));
$self->conv_support->param('patch_sql',$siteroot.$self->conv_support->param('patch_sql'));
return $self;
}
......@@ -238,7 +234,7 @@ sub do_conversion {
$self->conv_obj->create_attribs();
$self->conv_obj->set_top_level();
$self->conv_obj->transfer_dna();
$self->conv_obj->reset_gene_trans_tables();
$self->conv_obj->back_patch_schema();
$self->conv_obj->transfer_genes();
$self->conv_obj->transfer_prediction_transcripts();
......
......@@ -84,7 +84,7 @@ UPDATE gene SET source = 'vega';
# HAWK -> biotype conversions
UPDATE gene SET biotype='unclassified' WHERE biotype = 'Transcript';
UPDATE gene SET biotype='processed_transcript' WHERE biotype = 'Transcript';
UPDATE gene SET biotype='pseudogene', confidence='NOVEL' WHERE biotype = 'Pseudogene';
UPDATE gene SET biotype='protein_coding', confidence='NOVEL' WHERE biotype = 'Novel_CDS';
UPDATE gene SET biotype='processed_transcript', confidence='NOVEL' WHERE biotype = 'Novel_Transcript';
......@@ -101,7 +101,7 @@ UPDATE gene SET biotype=replace( biotype, '-','_' );
# reasonable biotypes for the transcripts, take the one from the gene
UPDATE transcript t, gene g SET t.biotype = g.biotype WHERE g.gene_id = t.gene_id;
UPDATE transcript t, gene g SET t.biotype = g.biotype, t.status = g.status WHERE g.gene_id = t.gene_id;
########################
......@@ -114,90 +114,6 @@ ALTER TABLE external_db ADD COLUMN dbprimary_acc_linkable BOOLEAN DEFAULT 1 NOT
ALTER TABLE external_db ADD COLUMN display_label_linkable BOOLEAN DEFAULT 0 NOT NULL;
ALTER TABLE external_db ADD COLUMN priority INT NOT NULL;
################################################################################
# Many changes to regulatory-feature-related tables
# Since these tables are empty it is easier to drop the existing
# tables and re-create the new ones
DROP TABLE regulatory_feature;
DROP TABLE regulatory_motif;
DROP TABLE regulatory_feature_object;
DROP TABLE peptide_regulatory_feature;
################################################################################
#
# Table structure for table 'regulatory_feature'
#
# Describes instances of regulatory_factor binding to the genome.
CREATE TABLE regulatory_feature (
regulatory_feature_id INT NOT NULL auto_increment,
name VARCHAR(255) NOT NULL,
seq_region_id INT NOT NULL, # FK refs seq_region
seq_region_start INT NOT NULL,
seq_region_end INT NOT NULL,
seq_region_strand TINYINT NOT NULL,
analysis_id INT NOT NULL, # FK refs analysis
regulatory_factor_id INT, # FK refs regulatory_motif
PRIMARY KEY(regulatory_feature_id)
) COLLATE=latin1_swedish_ci TYPE=MyISAM;
################################################################################
#
# Table structure for table 'regulatory_factor'
#
CREATE TABLE regulatory_factor (
regulatory_factor_id INT NOT NULL auto_increment,
name VARCHAR(255) NOT NULL,
type ENUM('miRNA_target', 'transcription_factor', 'transcription_factor_complex'),
PRIMARY KEY(regulatory_factor_id)
) COLLATE=latin1_swedish_ci TYPE=MyISAM;
################################################################################
#
# Table structure for table 'regulatory_feature_object'
#
# Relates regulatory regions to the Ensembl objects they influence. Many-many.
CREATE TABLE regulatory_feature_object (
regulatory_feature_id INT NOT NULL, # FK to regulatory_feature
ensembl_object_type ENUM( 'Transcript', 'Translation', 'Gene') NOT NULL,
ensembl_object_id INT NOT NULL, # FK to transcript,gene etc
influence ENUM('positive', 'negative', 'mixed', 'unknown'),
evidence VARCHAR(255),
KEY regulatory_feature_idx (regulatory_feature_id),
KEY ensembl_object_idx (ensembl_object_type, ensembl_object_id)
) COLLATE=latin1_swedish_ci TYPE=MyISAM;
################################################################################
#
# Table structure for table 'regulatory_factor_transcript'
#
# Describes which transcripts code for particular regulatory factors.
CREATE TABLE regulatory_factor_transcript (
transcript_id INT NOT NULL, # FK to transcript
regulatory_factor_id INT NOT NULL, # FK to regulatory_feature
KEY translation_idx (transcript_id),
KEY regulatory_factor_idx (regulatory_factor_id)
) COLLATE=latin1_swedish_ci TYPE=MyISAM;
########################
# FROM patch_32_33.sql #
......@@ -212,22 +128,8 @@ ALTER TABLE external_db ADD COLUMN db_display_name VARCHAR(255);
ALTER table object_xref MODIFY ensembl_object_type ENUM( 'RawContig', 'Transcript', 'Gene', 'Translation', 'regulatory_factor', 'regulatory_feature' ) not null;
DROP TABLE regulatory_factor_transcript;
CREATE TABLE regulatory_factor_coding (
regulatory_factor_id INT NOT NULL, # FK to regulatory_factor
transcript_id INT, # FK to transcript
gene_id INT, # FK to gene
KEY transcript_idx (transcript_id),
KEY gene_idx (gene_id),
KEY regulatory_factor_idx (regulatory_factor_id)
) COLLATE=latin1_swedish_ci TYPE=MyISAM;
alter table transcript change confidence status enum( 'KNOWN', 'NOVEL', 'PUTATIVE', 'PREDICTED' );
alter table gene change confidence status enum( 'KNOWN', 'NOVEL', 'PUTATIVE', 'PREDICTED' );
#set schema version
update meta set meta_value = '34' where meta_key = 'schema_version';
update meta set meta_value = '35' where meta_key = 'schema_version';
......@@ -20,7 +20,8 @@ CREATE TABLE gene_synonym (
synonym_id int(10) unsigned NOT NULL auto_increment,
name varchar(100) default NULL,
gene_info_id int(10) unsigned NOT NULL default '0',
PRIMARY KEY (synonym_id)
PRIMARY KEY (synonym_id),
KEY gene_info_id_idx (gene_info_id)
) TYPE=MyISAM;
......@@ -40,7 +41,8 @@ CREATE TABLE transcript_info (
mRNA_end_not_found enum('true','false') NOT NULL default 'true',
author_id int(10) unsigned NOT NULL default '0',
timestamp datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (transcript_info_id)
PRIMARY KEY (transcript_info_id),
KEY transcript_stable_id_idx (transcript_stable_id)
) TYPE=MyISAM;
################################################################################
......@@ -88,7 +90,8 @@ CREATE TABLE gene_name (
gene_name_id int(10) unsigned NOT NULL auto_increment,
name varchar(100) default NULL,
gene_info_id int(10) unsigned NOT NULL default '0',
PRIMARY KEY (gene_name_id)
PRIMARY KEY (gene_name_id),
KEY gene_info_id_idx (gene_info_id)
) TYPE=MyISAM;
......@@ -114,7 +117,8 @@ CREATE TABLE gene_remark (
gene_remark_id int(10) unsigned NOT NULL auto_increment,
remark text,
gene_info_id int(10) unsigned NOT NULL default '0',
PRIMARY KEY (gene_remark_id)
PRIMARY KEY (gene_remark_id),
KEY gene_info_id_idx (gene_info_id)
) TYPE=MyISAM;
......@@ -130,6 +134,7 @@ CREATE TABLE gene_info (
is_known enum('true','false') default 'false',
timestamp datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (gene_info_id)
KEY gene_stable_id_idx (gene_stable_id)
) TYPE=MyISAM;
......@@ -144,7 +149,7 @@ CREATE TABLE evidence (
transcript_info_id int(10) unsigned default NULL,
type enum('EST','cDNA','Protein','Genomic','UNKNOWN') default NULL,
PRIMARY KEY (evidence_id),
INDEX transcript_info_id_idx (transcript_info_id)
KEY transcript_info_id_idx (transcript_info_id)
) TYPE=MyISAM;
################################################################################
......@@ -156,7 +161,8 @@ CREATE TABLE transcript_remark (
transcript_remark_id int(10) unsigned NOT NULL auto_increment,
remark text,
transcript_info_id int(10) unsigned NOT NULL default '0',
PRIMARY KEY (transcript_remark_id)
PRIMARY KEY (transcript_remark_id),
KEY transcript_info_id_idx (transcript_info_id)
) TYPE=MyISAM;
################################################################################
......@@ -166,7 +172,7 @@ CREATE TABLE transcript_remark (
CREATE TABLE clone_info (
clone_info_id int(10) unsigned NOT NULL auto_increment,
clone_id int(10) unsigned NOT NULL default '0',
seq_region_id int(10) unsigned NOT NULL default '0',
author_id int(10) default NULL,
timestamp datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (clone_info_id),
......@@ -184,7 +190,8 @@ CREATE TABLE clone_remark (
clone_remark_id int(10) unsigned NOT NULL auto_increment,
remark text,
clone_info_id int(10) unsigned NOT NULL default '0',
PRIMARY KEY (clone_remark_id)
PRIMARY KEY (clone_remark_id),
KEY clone_info_id_idx (clone_info_id)
) TYPE=MyISAM;
......@@ -194,7 +201,7 @@ CREATE TABLE clone_remark (
CREATE TABLE current_clone_info (
clone_id int(10) unsigned NOT NULL default '0',
seq_region_id int(10) unsigned NOT NULL default '0',
clone_info_id int(10) unsigned NOT NULL default '0',
clone_version int(10) default NULL,
PRIMARY KEY (clone_id)
......
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