[Bioperl-l] Question on seqfeature mapping
flajus at labri.fr
Wed Feb 15 03:04:24 EST 2012
In fact, the query works fine. I don't understand why it didn't work
when I wrote the mail...
Le 11/02/2012 23:24, Hilmar Lapp a écrit :
> 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.)
More information about the Bioperl-l