Re: [Bioc-devel] Interoperability between DataFrame and dplyr?

2015-04-24 Thread Michael Lawrence
Lists are vectors, but as long as they aren't doing too much C++, or assert specific types, it should work. Functions like length(), names(), [, etc dispatch to both S3 and S4. On Thu, Apr 23, 2015 at 6:11 PM, Ryan Thompson r...@thompsonclan.org wrote: It looks like dplyr has support for base

Re: [Bioc-devel] Interoperability between DataFrame and dplyr?

2015-04-24 Thread Michael Lawrence
Sure, but the way DataFrame is flexible is by relying on two abstractions in base R. Just length() and '['. If dplyr does the same thing, which seems totally reasonable, everything should work the same. On Thu, Apr 23, 2015 at 4:32 PM, Vincent Carey st...@channing.harvard.edu wrote: Seems to me

Re: [Bioc-devel] as.character method for GenomicRanges?

2015-04-24 Thread Peter Haverty
Good catch. We'll want the strand in case we need to go back to a GRanges. I would make the strand addition optional with the default of FALSE. It's nice to have a column of strings you can paste right into a genome browser (sorry Michael :-) ). I often pass my bench collaborators a spreadsheet

Re: [Bioc-devel] as.character method for GenomicRanges?

2015-04-24 Thread Hervé Pagès
On 04/24/2015 11:08 AM, Peter Haverty wrote: Good catch. We'll want the strand in case we need to go back to a GRanges. I would make the strand addition optional with the default of FALSE. It's nice to have a column of strings you can paste right into a genome browser (sorry Michael :-) ). I

Re: [Bioc-devel] as.character method for GenomicRanges?

2015-04-24 Thread Peter Haverty
Going the other way can look like this: ##' Parse one or more location strings and return as a GRanges ##' ##' Parse one or more location strings and return as a GRanges. GRanges will get the names from the location.strings. ##' @param location.string character ##' @export ##'

Re: [Bioc-devel] as.character method for GenomicRanges?

2015-04-24 Thread Peter Haverty
Those are all good reasons for keeping the strand by default. I'm on board. Pete Peter M. Haverty, Ph.D. Genentech, Inc. phave...@gene.com On Fri, Apr 24, 2015 at 11:26 AM, Herv� Pag�s hpa...@fredhutch.org wrote: On 04/24/2015 11:08 AM, Peter Haverty wrote: Good catch.

Re: [Bioc-devel] as.character method for GenomicRanges?

2015-04-24 Thread Michael Lawrence
Taking this a bit off topic but it would be nice if we could get the GRanges equivalent of as.data.frame(table(x)), i.e., unique(x) with a count mcol. Should be easy to support but what should the API be like? On Fri, Apr 24, 2015 at 10:54 AM, Hervé Pagès hpa...@fredhutch.org wrote: On

Re: [Bioc-devel] Interoperability between DataFrame and dplyr?

2015-04-24 Thread Jim Hester
dplyr internally converts all `data.frame` objects to its `tbl_df` class and most dplyr methods operate on the `tbl` superclass, see ( https://github.com/hadley/dplyr/blob/master/R/tbl-df.r, https://github.com/hadley/dplyr/blob/master/R/tbl.r). The most direct route would to getting DataFrame

Re: [Bioc-devel] Interoperability between DataFrame and dplyr?

2015-04-24 Thread Michael Lawrence
On Fri, Apr 24, 2015 at 7:42 AM, Jim Hester james.f.hes...@gmail.com wrote: dplyr internally converts all `data.frame` objects to its `tbl_df` class and most dplyr methods operate on the `tbl` superclass, see ( https://github.com/hadley/dplyr/blob/master/R/tbl-df.r,

[Bioc-devel] BioC 2015 Conference Posters

2015-04-24 Thread Valerie Obenchain
Poster registration is now open. Visit the web site http://www.bioconductor.org/help/course-materials/2015/BioC2015/ and registration page https://register.bioconductor.org/BioC2015/poster_submit.php for more information. Posters can be from any area of computational biology, medicine,

Re: [Bioc-devel] Warnings from ls() in AnnotationDbi

2015-04-24 Thread Martin Morgan
On 04/24/2015 09:07 AM, James W. MacDonald wrote: A poster on the support site reported some warnings issued when running hyperGTest() from GOstats. I tracked this down to the ls() function from AnnotationDbi, when it dispatches on AnnDbBimap objects. The method is: setMethod(ls,

Re: [Bioc-devel] as.character method for GenomicRanges?

2015-04-24 Thread Michael Lawrence
Sorry, one more concern, if you're thinking of using as a range key, you will need the strand, but many use cases might not want the strand on there. Like for pasting into a genome browser. On Fri, Apr 24, 2015 at 10:18 AM, Michael Lawrence micha...@gene.com wrote: It is a great idea, but I'm

Re: [Bioc-devel] as.character method for GenomicRanges?

2015-04-24 Thread Michael Lawrence
It is a great idea, but I'm not sure I would use it to implement table(). Allocating those strings will be costly. Don't we already have the 4-way int hash? Of course, my intuition might be completely off here. On Fri, Apr 24, 2015 at 9:59 AM, Hervé Pagès hpa...@fredhutch.org wrote: Hi Pete,

Re: [Bioc-devel] as.character method for GenomicRanges?

2015-04-24 Thread Hervé Pagès
On 04/24/2015 10:18 AM, Michael Lawrence wrote: It is a great idea, but I'm not sure I would use it to implement table(). Allocating those strings will be costly. Don't we already have the 4-way int hash? Of course, my intuition might be completely off here. It does use the 4-way int hash