[BioC] Subscripting GenomicRanges objects with [[ or $

Steve Lianoglou mailinglist.honeypot at gmail.com
Fri Aug 27 18:55:11 CEST 2010


On Fri, Aug 27, 2010 at 12:37 PM, Michael Lawrence
<lawrence.michael at gene.com> wrote:
> On Fri, Aug 27, 2010 at 7:02 AM, Martin Morgan <mtmorgan at fhcrc.org> wrote:
<snip>

>> These were intentional design decisions to reduce ambiguities in which
>> of the components of these complex arguments subscript operations were
>> meant to apply, in the long run making it easier to write unambiguous
>> and easy to read code. Martin
>>
>>
> I would argue that in the long run, after the user reads the documentation
> and understood the API, it would result in terser code that is easier to
> read and write. I think that using $ and [[ to access metadata columns is
> very intuitive.

I would tend to agree with Michael on this one, too. In my mind (maybe
not anyone else's :-), it somehow relates to a thread I started on the
bioc-seq-sig list a while ago about adding more mojo to the
subset(...) method when working with IRanges (or any
Ranged/Sequence-like) objects it to "close over" the columns of their
elementMetadata objects:

http://thread.gmane.org/gmane.comp.lang.r.sequencing/1239

-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact



More information about the Bioconductor mailing list