Skip to content
Snippets Groups Projects
Commit 392735ac authored by Arne Stabenau's avatar Arne Stabenau
Browse files

changed the order of exon removal and delete statement,

to enable lazy loading

removed warning for shared exons
parent fe7dd406
No related branches found
No related tags found
No related merge requests found
......@@ -557,6 +557,17 @@ sub remove {
$translationAdaptor->remove( $transcript->translation );
}
foreach my $exon ( @{$transcript->get_all_Exons()} ) {
my $sth = $self->prepare( "SELECT count(*)
FROM exon_transcript
WHERE exon_id = ?" );
$sth->execute( $exon->dbID );
my ($count) = $sth->fetchrow_array;
if($count == 1){
$exonAdaptor->remove( $exon );
}
}
my $sth = $self->prepare( "DELETE FROM exon_transcript
WHERE transcript_id = ?" );
$sth->execute( $transcript->dbID );
......@@ -567,20 +578,6 @@ sub remove {
WHERE transcript_id = ?" );
$sth->execute( $transcript->dbID );
foreach my $exon ( @{$transcript->get_all_Exons()} ) {
my $sth = $self->prepare( "SELECT count(*)
FROM exon_transcript
WHERE exon_id = ?" );
$sth->execute( $exon->dbID );
my ($count) = $sth->fetchrow_array;
if($count == 0){
$exonAdaptor->remove( $exon );
} else{
warning("exon " . $exon->dbID . " is not exclusive to transcript " .
$transcript->dbID . "\n");
}
}
$transcript->dbID(undef);
$transcript->adaptor(undef);
......
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