[DAS2] feature filter examples

Allen Day allenday at ucla.edu
Wed Apr 6 16:02:40 UTC 2005


You're right -- this is unclear.  I was talking to Lincoln about this 
Monday.  The following are true by the current document for key=value 
strings:

[1] comma-delimited values for the same key are ORed
[2] different keys are ANDed

But is unclear how to handle the separate values for keys of the same
name.  I would interpret separate values as a case of [2], as you do here:

> att=hand:fizzbin,slark;att=hand:royal
> 
> This is the same as
>    (hand contains "fizzbin" OR hand contains "slark") AND
>    (hand contains "royal")

matching features with "hand" attribute subset values of {royal,fizzbin}
and {royal,slark}.

We might consider revising this though.  It could create problems with
other technologies that use GET, for example HTML forms with GET method.  
You might want to have a multi-select list that allows you to select
attribute values for "hand", and if you chose "fizzbin" and "slark", you'd
get a URI param string looking like:

.../feature?att=hand:fizzbin;att=hand:slark

As far as I'm aware there's no way to change this short of having another
script handle this request, munging the parameters to what the user really
meant, and returning the browser a redirect header.

-Allen


On Wed, 6 Apr 2005, Andrew Dalke wrote:

> I'm having some difficulty understanding the feature query
> language.  There's an example in the spec which is
> 
>      overlaps=Chr3/1000:2000;type=exon,intron,splice_site
> 
>      (Features of type exon, intron, or splice_site that
>      overlap region 1000-2000 on Chr3.)
> 
> Based on that, the following appears to be legal
> 
>    overlaps=Contig1/1:1000;att=hand:fizzbin;overlaps=Contig1/5:200
> 
> That is, it is legal for the same feature filter ("overlaps")
> to exist multiple times in the query.  If so there should
> be a note pointing that out.
> 
> 
> Are the following allowed?
> 
> 1) an OR of the values for a region
> 
>    overlaps=Contig1/1:1000,Contig8/5:200
> 
> 2) an OR of an att query
> 
>    att=hand:fizzbin,slark
> 
> 3) and OR and an AND of the same attribute in an att filter
> 
>    att=hand:fizzbin,slark;att=hand:royal
> 
> This is the same as
>    (hand contains "fizzbin" OR hand contains "slark") AND
>    (hand contains "royal")
> 
> so would match "royal fizzbin" hands.
> 
> I think they are all legal.  I think I can improve
> the wording a bit for clarification.
> 
> 
> 					Andrew
> 					dalke at dalkescientific.com
> 
> _______________________________________________
> DAS2 mailing list
> DAS2 at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/das2
> 



More information about the DAS2 mailing list