[DAS2] feature filter examples
Ed Erwin
ed_erwin at affymetrix.com
Wed Apr 6 22:29:57 UTC 2005
I'm glad someone is paying attention to these details.
Please also keep in mind making the parsing of the parameters
straitforward. There should be some simple deterministic algorithm
like, for example, this:
1. Split the string at ';'
2. apply URL-decoding (to convert "%20" and "+" to " ", etc.)
3. split at the first "=" into left-hand and right-hand
4. split right-hand at the first ":" into right-hand-one and right-hand-two
5. split right-hand-two at each ","
I'm certain this is not the exactly right formula, but I'm saying we
need to make sure that there is some known formula that works and is
unambiguous. Consider the tough cases like spaces and punctuation
characters like "hand:fizz bin 3.0,genscan+"
Allen Day wrote:
> 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
> >
> _______________________________________________
> DAS2 mailing list
> DAS2 at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/das2
>
More information about the DAS2
mailing list