Skip to content
Snippets Groups Projects
Commit 39a0fdff authored by Stephen Searle's avatar Stephen Searle
Browse files

Added supporting feature store

parent 2dd5aed8
No related branches found
No related tags found
No related merge requests found
......@@ -676,6 +676,41 @@ sub store {
$sth->finish();
}
# Now the supporting evidence
# should be stored from featureAdaptor
my $sql = "insert into transcript_supporting_feature (transcript_id, feature_id, feature_type)
values(?, ?, ?)";
my $sf_sth = $self->prepare($sql);
my $anaAdaptor = $self->db->get_AnalysisAdaptor();
my $dna_adaptor = $self->db->get_DnaAlignFeatureAdaptor();
my $pep_adaptor = $self->db->get_ProteinAlignFeatureAdaptor();
my $type;
foreach my $sf (@{$transcript->get_all_supporting_features}) {
if(!$sf->isa("Bio::EnsEMBL::BaseAlignFeature")){
throw("$sf must be an align feature otherwise" .
"it can't be stored");
}
if($sf->isa("Bio::EnsEMBL::DnaDnaAlignFeature")){
$dna_adaptor->store($sf);
$type = 'dna_align_feature';
}elsif($sf->isa("Bio::EnsEMBL::DnaPepAlignFeature")){
$pep_adaptor->store($sf);
$type = 'protein_align_feature';
} else {
warning("Supporting feature of unknown type. Skipping : [$sf]\n");
next;
}
$sf_sth->execute($transc_dbID, $sf->dbID, $type);
}
#update the original transcript object - not the transfered copy that
#we might have created
$original->dbID( $transc_dbID );
......
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