[BioSQL-l] Query Problem.

Frederic Pecqueur Frederic.Pecqueur at devgen.com
Mon Dec 22 10:05:17 EST 2003


Hi,

I try to create a query to search all the entries which have a tag "other_name" equal to 'mig-11'....and it dosen't work...

I use this code :

my $adp = $db->get_object_adaptor('Bio::PrimarySeqI');

my $query = Bio::DB::Query::BioQuery->new(
                -datacollections => [
                    "Bio::PrimarySeqI entr",
                    "Bio::SeqFeatureI  feat",
                    "Bio::Ontology::TermI  ter",
                    "BioNamespace=>Bio::PrimarySeqI db",
                    "Bio::PrimarySeqI=>Bio::SeqFeatureI",
                    "Bio::SeqFeatureI<=>Bio::Ontology::TermI  qual"
                ],
                -where => ["db.namespace = 'WormGene'",
                           "ter.name = 'other_name'",
                           "qual.value = 'mig-11'"]
);

my $result = $adp->find_by_query($query);

I have this error :

attempting to load driver for adaptor class Bio::DB::BioSQL::PrimarySeqAdaptor
attempting to load driver for adaptor class Bio::DB::BioSQL::BasePersistenceAdaptor
Using Bio::DB::BioSQL::Oracle::BasePersistenceAdaptorDriver as driver peer for Bio::DB::BioSQL::PrimarySeqAdaptor

------------- EXCEPTION  -------------
MSG: Alias "q" not mapped to entity. Are you sure there's no typo?
STACK Bio::DB::Query::BioQuery::_map_slot_to_col /usr/lib/perl5/site_perl/5.6.1/Bio/DB/Query/BioQuery.pm:466
STACK Bio::DB::Query::BioQuery::_map_constraint_slots_to_columns /usr/lib/perl5/site_perl/5.6.1/Bio/DB/Query/BioQuery.pm:369
STACK Bio::DB::Query::BioQuery::_map_constraint_slots_to_columns /usr/lib/perl5/site_perl/5.6.1/Bio/DB/Query/BioQuery.pm:355
STACK Bio::DB::Query::BioQuery::translate_query /usr/lib/perl5/site_perl/5.6.1/Bio/DB/Query/BioQuery.pm:305
STACK Bio::DB::BioSQL::BaseDriver::translate_query /usr/lib/perl5/site_perl/5.6.1/Bio/DB/BioSQL/BaseDriver.pm:1184
STACK Bio::DB::BioSQL::BasePersistenceAdaptor::find_by_query /usr/lib/perl5/site_perl/5.6.1/Bio/DB/BioSQL/BasePersistenceAdaptor.pm:1198

I don't use the API correctly?? 
Somebody has a response?

Thanks a lot!
Frédéric.



More information about the BioSQL-l mailing list