[BioSQL-l] Query Problem.
Hilmar Lapp
hlapp at gnf.org
Mon Dec 22 11:26:32 EST 2003
This error is pretty weird. Smells like a bug, I'm just not sure where.
Try collapsing the multiple spaces between entity and alias into a
single space for every datacollection and see whether it goes away. I
can't tell where it would get the 'q' as an alias from.
A tip aside from that: I'd request the adaptor for Bio::SeqI or
otherwise you won't get features and annotation on the resulting
objects.
-hilmar
On Monday, December 22, 2003, at 07:05 AM, Frederic Pecqueur wrote:
> 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.
>
> _______________________________________________
> BioSQL-l mailing list
> BioSQL-l at open-bio.org
> http://open-bio.org/mailman/listinfo/biosql-l
>
--
-------------------------------------------------------------
Hilmar Lapp email: lapp at gnf.org
GNF, San Diego, Ca. 92121 phone: +1-858-812-1757
-------------------------------------------------------------
More information about the BioSQL-l
mailing list