[Bioperl-l] BioQuery failure

Hilmar Lapp hlapp at gnf.org
Mon Feb 23 13:13:34 EST 2004


First off, I have no clue where the code is taking the column accession  
from, since you give the correct attribute name accession_number.

For the rest see below.

On Monday, February 23, 2004, at 02:20  AM, Eric Bazin wrote:

> Hi,
>
> I discovered bioperl-db few days ago and i'm very enthusiatic using  
> this
> tool but i've got a problem using BioQuery. I would be grateful if
> anybody can give me an answer about that.
>
> This a piece of my code:
>
> my $db = Bio::DB::BioDB->new(-database => "biosql",
> 				 -host     => $host,
> 				 -dbname   => $dbname,
> 				 -driver   => $driver,
> 				 -user     => $dbuser,
> 				 -pass     => $dbpass,
> 				 -verbose  => 10,
> 				 );			
> my $query = Bio::DB::Query::BioQuery->new(
> 	-datacollections=>["Bio::SeqI seq",
> 		"Bio::Annotation::Reference ref",
> 		"Bio::Annotation::Reference<=>Bio::SeqI"
> 		],
> 	-select=>["ref.authors"],

Note that the -select parameter or setting will be ignored, since the  
adaptors need to have control over the select list in order to be able  
to build objects.


> 	-where=>["and", "seq.accession_number='AJ311144'",
> 		seq.display_id='AAG311144'"]
> 	);
>
> $query->flag("distinct", 1);
>
> my $adaptor = $db->get_object_adaptor("Bio::Annotation::Reference");
> my @tab = $adaptor->find_by_query($query);

Note that find_by_query() returns an object to you (a  
Bio::DB::Query::QueryResultI-compliant instance), which is basically an  
iterator over the result set (call $query_result->next_object() until  
it returns undef).

>
> I receive this error message:
>
> ------------- EXCEPTION  -------------
> MSG: slot 'accession' not mapped to column for table bioentry

As I said, I have no clue how you might get here. First off, to exclude  
the obvious, you did obtain the latest revision from CVS, right? Also,  
the test suite that comes with bioperl-db did or did not pass all tests?

If your answer is yes to both of the questions above, we need to get  
more verbose debugging output. Insert the following statement after you  
obtain the $db handle:

	$db->verbose(1);

Then run the code again, capture the output in a file, and send it to  
me.

	-hilmar

> STACK Bio::DB::Query::BioQuery::_map_slot_to_col
> /usr/lib/perl5/site_perl/5.8.0/Bio/DB/Query/BioQuery.pm:487
> STACK Bio::DB::Query::BioQuery::_map_constraint_slots_to_columns
> /usr/lib/perl5/site_perl/5.8.0/Bio/DB/Query/BioQuery.pm:369
> STACK Bio::DB::Query::BioQuery::_map_constraint_slots_to_columns
> /usr/lib/perl5/site_perl/5.8.0/Bio/DB/Query/BioQuery.pm:356
> STACK Bio::DB::Query::BioQuery::translate_query
> /usr/lib/perl5/site_perl/5.8.0/Bio/DB/Query/BioQuery.pm:305
> STACK Bio::DB::BioSQL::BaseDriver::translate_query
> /usr/lib/perl5/site_perl/5.8.0/Bio/DB/BioSQL/BaseDriver.pm:1182
> STACK Bio::DB::BioSQL::BasePersistenceAdaptor::find_by_query
> /usr/lib/perl5/site_perl/5.8.0/Bio/DB/BioSQL/ 
> BasePersistenceAdaptor.pm:1198
> STACK (eval) /var/www/cgi-bin/getentry.pl:97
> STACK toplevel /var/www/cgi-bin/getentry.pl:67
>
> -- 
> Eric Bazin
> Laboratoire "Génome Populations Interactions Adaptation"
> UM2 - IFREMER - CNRS  UMR 5171
> Université de Montpellier 2
> C.C. 63,  bâtiment 24 ;34095 Montpellier Cedex 5
> Tel:(0)4-67-14-39-13
> Tel perso:(0)6-20-91-49-62
> Fax:(0)4-67-14-45-54
> http://www.univ-montp2.fr/~genetix
> Seminaires internes: http://162.38.181.25/seminaire.html
>
>
>
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>
>
-- 
-------------------------------------------------------------
Hilmar Lapp                            email: lapp at gnf.org
GNF, San Diego, Ca. 92121              phone: +1-858-812-1757
-------------------------------------------------------------





More information about the Bioperl-l mailing list