[Bioperl-l] Question on seqfeature mapping

Hilmar Lapp hlapp at drycafe.net
Sat Feb 11 17:24:01 EST 2012

On Feb 8, 2012, at 4:52 AM, Lajus Florian wrote:

> Never mind. It works much better if write: "Bio::Annotation::SimpleValue<=>Bio::SeqFeatureI instead.

Yes indeed, for n-n associations you need to use "<=>".

> The problem is if we also want to find by primary_tag:
> my $query = Bio::DB::Query::BioQuery->new(
> -datacollections => ["Bio::Annotation::SimpleValue<=>Bio::SeqFeatureI qv"],
> -where => ["Bio::Annotation::SimpleValue::tagname = \'$tag\'","qv.value = \'$value\'","Bio::SeqFeatureI.primary_tag = ".$term_primary_key]);
> The slot type_term_id is not mapped to column for table seqfeature

It is actually - both the mapping for term and for seqfeature have the mapping of primary_tag to type_term_id. What error are you getting?

And shouldn't Bio::SeqFeatureI.primary_tag have a double colon instead of the dot? (Also, BTW, you should be able to say "qv.tagname" instead of "Bio::Annotation::SimpleValue::tagname", just as you do for the value column - have you tried that and found it not to work? Either way, what you have for that part looks correct.) 

: Hilmar Lapp -:- Durham, NC -:- hlapp at drycafe dot net :

More information about the Bioperl-l mailing list