Skip to content
Snippets Groups Projects
Unverified Commit 8e08e2de authored by Magali Ruffier's avatar Magali Ruffier Committed by GitHub
Browse files

Merge pull request #269 from Ensembl/bugfix/multispecies_pf

backport ENSCORESW-2767: multi-species support for protein feature
parents 89a73e1b b539fb76
No related branches found
No related tags found
4 merge requests!342Feature/schema update 96,!273Master,!342Feature/schema update 96,!273Master
......@@ -522,6 +522,7 @@ sub _generate_sql {
# coord_system).
if ( $self->is_multispecies()
&& $self->isa('Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor')
&& !$self->isa('Bio::EnsEMBL::DBSQL::BaseAlignFeatureAdaptor')
&& !$self->isa('Bio::EnsEMBL::DBSQL::UnmappedObjectAdaptor') )
{
# We do a check to see if there is already seq_region
......
......@@ -38,9 +38,22 @@ my $pfa = $dba->get_ProteinFeatureAdaptor();
ok($pfa && ref($pfa) && $pfa->isa('Bio::EnsEMBL::DBSQL::ProteinFeatureAdaptor'));
my $pfs = $pfa->fetch_all_by_translation_id(21724);
ok(@$pfs == 15);
#check if the pfa is multispecies
isnt($pfa->is_multispecies(), 0, "Adaptor is not multispecies");
#set it to multispecies mode to test if it works for collection dbs
$pfa->is_multispecies(1);
#check if the pfa is multispecies
is($pfa->is_multispecies(), 1, "Adaptor is multispecies");
$pfs = $pfa->fetch_all_by_translation_id(21724);
ok(@$pfs == 15);
#set it back to single species mode
$pfa->is_multispecies(0);
sub print_features {
my $features = shift;
foreach my $f (@$features) {
......
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