Re: [Bioc-devel] Behavior of select function in AnnotationDbi

2015-11-23 Thread Vincent Carey
;, multiVals="first") > 'select()' returned 1:many mapping between keys and columns > BRCA1 > "GO:151" > > Martin > > > From: Bioc-devel [bioc-devel-boun...@r-project.org] on behalf of James W

Re: [Bioc-devel] Behavior of select function in AnnotationDbi

2015-11-23 Thread Morgan, Martin
ect.org] on behalf of James W. MacDonald [jmac...@uw.edu] Sent: Monday, November 23, 2015 11:16 AM To: Hervé Pagès Cc: bioc-devel@r-project.org Subject: Re: [Bioc-devel] Behavior of select function in AnnotationDbi Hi Hervé, Hmmm. Persuasive arguments. I like it! I'm pretty close to thinki

Re: [Bioc-devel] Behavior of select function in AnnotationDbi

2015-11-23 Thread James W. MacDonald
Hi Hervé, Hmmm. Persuasive arguments. I like it! I'm pretty close to thinking you are right about this. However there is one small stumbling block. While select() allows for the look up of multiple columns simultaneously, mapIds() does not. But I do like your idea of having a function that guaran

Re: [Bioc-devel] Behavior of select function in AnnotationDbi

2015-11-22 Thread Hervé Pagès
Hi Jim, I understand the convenience of having an output that is parallel to the input, especially in the context of the primary use case which is mapping/cbinding ids to a rectangular object. However for that use case, "as close to parallel as possible" is not good enough. IMO the user needs a t

Re: [Bioc-devel] Behavior of select function in AnnotationDbi

2015-11-21 Thread James W. MacDonald
Hi Hervé, I think you make a valid point, but I am not sure it conforms to either the historical expectations for the annotation packages, nor the expected use case. In other words, the annotation packages have, since the beginning, returned something that was as close to parallel to the input as

Re: [Bioc-devel] Behavior of select function in AnnotationDbi

2015-11-20 Thread Hervé Pagès
On 11/20/2015 03:21 PM, Hervé Pagès wrote: Hi Jim, I think we should choose the biomaRt model, that is, duplicated are allowed but silently ignored. Note that this is also the SQL model. When you do SELECT * FROM ... WHERE key IN c('key1', 'key2', ...) ^

Re: [Bioc-devel] Behavior of select function in AnnotationDbi

2015-11-20 Thread Hervé Pagès
Hi Jim, I think we should choose the biomaRt model, that is, duplicated are allowed but silently ignored. Note that this is also the SQL model. When you do SELECT * FROM ... WHERE key IN c('key1', 'key2', ...) duplicated keys don't generate duplicates in the output. Also note that, like SEL

Re: [Bioc-devel] Behavior of select function in AnnotationDbi

2015-11-20 Thread Morgan, Martin
I think the answer to 1 should be yes, duplicate keys are allowed. For instance, a vector of ids and a factor that groups the ids somehow (e.g., by experiment), with ids unique in each group. So I'm for step #2. Martin From: Bioc-devel [bioc-devel-boun..