Commit 0c4d8be1 authored by Magali Ruffier's avatar Magali Ruffier
Browse files

removed unconventional_transcript_association

table removed from schema, modules removed, tests removed, associated calls removed
parent b8c6251f
......@@ -46,7 +46,7 @@ use base qw( Exporter );
our @EXPORT = qw( software_version );
my $API_VERSION = 73;
my $API_VERSION = 74;
sub software_version { return $API_VERSION }
......
......@@ -334,7 +334,7 @@ sub get_available_adaptors {
RepeatFeature Sequence SeqRegionSynonym SimpleFeature
Slice SupportingFeature Transcript
TranscriptSupportingFeature Translation UnmappedObject
UnconventionalTranscriptAssociation AssemblySlice
AssemblySlice
SplicingEvent SplicingEventFeature SplicingTranscriptPair
Operon OperonTranscript
DataFile Assembly
......
......@@ -1280,11 +1280,6 @@ sub store {
my $attr_adaptor = $db->get_AttributeAdaptor();
$attr_adaptor->store_on_Gene($gene_dbID, $gene->get_all_Attributes);
# store unconventional transcript associations if there are any
my $utaa = $db->get_UnconventionalTranscriptAssociationAdaptor();
foreach my $uta (@{$gene->get_all_unconventional_transcript_associations()}) {
$utaa->store($uta);
}
# set the adaptor and dbID on the original passed in gene not the
# transfered copy
......@@ -1346,13 +1341,6 @@ sub remove {
$transcriptAdaptor->remove($trans);
}
# remove any unconventional transcript associations involving this gene
$sth = $self->prepare("DELETE FROM unconventional_transcript_association " . "WHERE gene_id = ? ");
$sth->bind_param(1, $gene->dbID, SQL_INTEGER);
$sth->execute();
$sth->finish();
# remove this gene from the database
$sth = $self->prepare("DELETE FROM gene WHERE gene_id = ? ");
......
......@@ -1363,90 +1363,6 @@ sub get_all_DAS_Features{
}
=head2 add_unconventional_transcript_association
Arg [1] : Bio::EnsEMBL::Transcript $trans
The transcript to associate with the gene, in an unconventional manner.
Arg [2] : String $type
The type of association between this gene and this transcript, e.g.
"antisense","sense_intronic","sense_overlaping_exonic","chimeric_sense_exonic"
Example : my $transcript = Bio::EnsEMBL::Transcript->new(...);
$gene->add_unconventional_transcript_association($transcript, "antisense");
Description: Associate a transcript with this gene in a way that is
non-conventional.
Returntype : none
Exceptions : none
Caller : general
Status : At Risk.
=cut
sub add_unconventional_transcript_association {
my ($self, $transcript, $type) = @_;
if( !ref $transcript || ! $transcript->isa("Bio::EnsEMBL::Transcript") ) {
throw("$transcript is not a Bio::EnsEMBL::Transcript!");
}
my $uta = Bio::EnsEMBL::UnconventionalTranscriptAssociation->new($transcript, $self, $type);
$self->{'_unconventional_transcript_array'} ||= [];
push(@{$self->{'_unconventional_transcript_array'}}, $uta);
}
=head2 get_all_unconventional_transcript_associations
Arg [1] : (optional) String - Only get transcripts where the association
between this gene and the transcripts is of a certain type.
Example : my @transcripts = @{ $gene->get_all_unconventional_transcript_associations, "antisense" };
Description: Returns the unconventional transcripts associated with this gene.
Returntype : Listref of Bio::EnsEMBL::UnconventionalTranscriptAssociation objects
Exceptions : none
Caller : general
Status : At risk.
=cut
sub get_all_unconventional_transcript_associations {
my ($self, $type) = @_;
if( ! exists $self->{'_unconventional_transcript_array'} ) {
$self->{'_unconventional_transcript_array'} = [];
if( defined $self->adaptor() ) {
my $utaa = $self->adaptor()->db()->get_UnconventionalTranscriptAssociationAdaptor();
my $utas = $utaa->fetch_all_by_gene( $self, $type );
$self->{'_unconventional_transcript_array'} = $utas;
}
}
return $self->{'_unconventional_transcript_array'};
}
=head2 remove_unconventional_transcript_associations
Args : None
Example : $gene->remove_unconventional_transcript_associations();
Description: Returns the unconventional transcripts associated with this gene.
Returntype : Listref of Bio::EnsEMBL::UnconventionalTranscriptAssociation objects
Exceptions : none
Caller : general
Status : At risk.
=cut
sub remove_unconventional_transcript_associations {
my $self = shift;
$self->{'_unconventional_transcript_array'} = [];
}
=head2 load
Arg [1] : Boolean $load_xrefs
......
......@@ -766,44 +766,9 @@ ok($gene->is_current == 1);
$multi->restore;
#
# Tests for unconventional transcript association functionality
#
# test a gene with existing associations
$gene = $ga->fetch_by_dbID(18256);
ok(@{$gene->get_all_unconventional_transcript_associations()} == 3);
# test removing them all
$gene->remove_unconventional_transcript_associations();
ok(@{$gene->get_all_unconventional_transcript_associations()} == 0);
# test adding to a new gene
my $new_gene = $ga->fetch_by_dbID(18260);
my $new_transcript = $db->get_TranscriptAdaptor()->fetch_by_dbID(21720);
ok(@{$new_gene->get_all_unconventional_transcript_associations()} == 0);
$new_gene->add_unconventional_transcript_association($new_transcript, 'sense_intronic');
ok(@{$new_gene->get_all_unconventional_transcript_associations()} == 1);
# test storing
$new_gene = $ga->fetch_by_dbID(18261);
ok(@{$new_gene->get_all_unconventional_transcript_associations()} == 0);
$new_gene->add_unconventional_transcript_association($new_transcript, 'sense_intronic');
$new_gene->add_unconventional_transcript_association($new_transcript, 'antisense');
$ga->store($new_gene);
# test removing
$new_gene->remove_unconventional_transcript_associations();
my $utaa = $db->get_UnconventionalTranscriptAssociationAdaptor();
ok(@{$utaa->fetch_all_by_gene($new_gene)} == 0);
#testing canonical_transcript information
$new_gene = $ga->fetch_by_dbID(18256);
my $new_gene = $ga->fetch_by_dbID(18256);
ok($new_gene->canonical_transcript->dbID == 21716); #test 85
ok($new_gene->canonical_annotation eq 'longest transcript in gene'); #test 86
......
......@@ -35,7 +35,7 @@ use FindBin qw/$Bin/;
use Getopt::Long;
my $help = 0;
my $current_schema_no_cvs = 0;
my $current_schema_no_cvs = 1;
#
# Parse command-line arguments
......
......@@ -4,7 +4,7 @@
59 \N patch patch_72_73_b.sql|alt_allele_type
60 \N patch patch_72_73_c.sql|add_object_type_marker
1 \N schema_type core
2 \N schema_version 73
2 \N schema_version 74
8 1 assembly.accession GCA_000292705.1
10 1 assembly.date 2012-08
7 1 assembly.default GCA_000292705.1
......
......@@ -897,14 +897,6 @@ CREATE TABLE `translation_attrib` (
KEY `translation_idx` (`translation_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `unconventional_transcript_association` (
`transcript_id` int(10) unsigned NOT NULL,
`gene_id` int(10) unsigned NOT NULL,
`interaction_type` enum('antisense','sense_intronic','sense_overlaping_exonic','chimeric_sense_exonic') DEFAULT NULL,
KEY `transcript_idx` (`transcript_id`),
KEY `gene_idx` (`gene_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `unmapped_object` (
`unmapped_object_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`type` enum('xref','cDNA','Marker') NOT NULL,
......
1 \N schema_version 73
1 \N schema_version 74
2 1 assembly.default NCBI34
33 1 species.classification Chordata
32 1 species.classification Vertebrata
......
......@@ -896,14 +896,6 @@ CREATE TABLE `translation_attrib` (
KEY `val_only_idx` (`value`(40))
) ENGINE=MyISAM ;
CREATE TABLE `unconventional_transcript_association` (
`transcript_id` int(10) unsigned NOT NULL,
`gene_id` int(10) unsigned NOT NULL,
`interaction_type` enum('antisense','sense_intronic','sense_overlaping_exonic','chimeric_sense_exonic') DEFAULT NULL,
KEY `transcript_idx` (`transcript_id`),
KEY `gene_idx` (`gene_id`)
) ENGINE=MyISAM ;
CREATE TABLE `unmapped_object` (
`unmapped_object_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`type` enum('xref','cDNA','Marker') NOT NULL,
......
1 \N schema_version 73
1 \N schema_version 74
2 1 assembly.default NCBI34
33 1 species.classification Chordata
32 1 species.classification Vertebrata
......
......@@ -846,14 +846,6 @@ CREATE TABLE `translation_attrib` (
KEY `translation_idx` (`translation_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `unconventional_transcript_association` (
`transcript_id` int(10) unsigned NOT NULL,
`gene_id` int(10) unsigned NOT NULL,
`interaction_type` enum('antisense','sense_intronic','sense_overlaping_exonic','chimeric_sense_exonic') DEFAULT NULL,
KEY `transcript_id` (`transcript_id`),
KEY `gene_id` (`gene_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `unmapped_object` (
`unmapped_object_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`type` enum('xref','cDNA','Marker') CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
......
1 \N schema_version 73
1 \N schema_version 74
2014 1 species.classification Haplorrhini
40 1 assembly.default GRCh37
41 1 assembly.date 2009-02
......
......@@ -856,14 +856,6 @@ CREATE TABLE `translation_attrib` (
KEY `translation_idx` (`translation_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
CREATE TABLE `unconventional_transcript_association` (
`transcript_id` int(10) unsigned NOT NULL,
`gene_id` int(10) unsigned NOT NULL,
`interaction_type` enum('antisense','sense_intronic','sense_overlaping_exonic','chimeric_sense_exonic') DEFAULT NULL,
KEY `transcript_id` (`transcript_id`),
KEY `gene_id` (`gene_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `unmapped_object` (
`unmapped_object_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`type` enum('xref','cDNA','Marker') COLLATE latin1_bin NOT NULL,
......
......@@ -255,17 +255,17 @@ CREATE TABLE IF NOT EXISTS meta (
# Add schema type and schema version to the meta table.
INSERT INTO meta (species_id, meta_key, meta_value) VALUES
(NULL, 'schema_type', 'core'),
(NULL, 'schema_version', '73');
(NULL, 'schema_version', '74');
# Patches included in this schema file:
# NOTE: At start of release cycle, remove patch entries from last release.
# NOTE: Avoid line-breaks in values.
INSERT INTO meta (species_id, meta_key, meta_value)
VALUES (NULL, 'patch', 'patch_72_73_a.sql|schema_version');
VALUES (NULL, 'patch', 'patch_73_74_a.sql|schema_version');
INSERT INTO meta (species_id, meta_key, meta_value)
VALUES (NULL, 'patch', 'patch_72_73_b.sql|alt_allele_type');
VALUES (NULL, 'patch', 'patch_73_74_b.sql|remove_dnac');
INSERT INTO meta (species_id, meta_key, meta_value)
VALUES (NULL, 'patch', 'patch_72_73_c.sql|add_object_type_marker');
VALUES (NULL, 'patch', 'patch_73_74_c.sql|remove_unconventional_transcript_association');
/**
......@@ -2614,27 +2614,4 @@ CREATE TABLE qtl_synonym (
) COLLATE=latin1_swedish_ci ENGINE=MyISAM;
/**
@table unconventional_transcript_association
@desc Describes transcripts that do not link to a single gene in the normal way.
@column transcript_id Foreign key references to the @link transcript table.
@column gene_id Foreign key references to the @link gene table.
@column interaction_type Type of interaction: 'antisense','sense_intronic','sense_overlaping_exonic','chimeric_sense_exonic'.
*/
CREATE TABLE unconventional_transcript_association (
transcript_id INT(10) UNSIGNED NOT NULL,
gene_id INT(10) UNSIGNED NOT NULL,
interaction_type ENUM("antisense","sense_intronic","sense_overlaping_exonic","chimeric_sense_exonic"),
KEY transcript_idx (transcript_id),
KEY gene_idx (gene_id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
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