[Bioc-sig-seq] Why are there non-imformative names() from GenomicFeatures:::exonsBy(...)?

Steve Lianoglou mailinglist.honeypot at gmail.com
Mon Aug 16 23:52:18 CEST 2010

Hi Hervé,

2010/8/16 Hervé Pagès <hpages at fhcrc.org>:
> Sorry for the delay on this.

No problem :-)


> But yes, even if the transcript names are not guaranteed to be
> unique, it's still useful to have the GRangesList object returned
> by exonsBy() set with those names.
> Starting with GenomicFeatures 1.0.10 (will be available in the
> next 24 hours or so), transcriptsBy(), exonsBy(), cdsBy(),
> intronsByTranscript(), fiveUTRsByTranscript() and
> threeUTRsByTranscript() accept extra argument 'use.names' (FALSE
> by default). This allows the user to choose how the returned
> object should be named: with the feature internal ids (not very
> informative but guaranteed to be defined and unique), or with the
> feature names (more informative but not guaranteed to be unique or
> even defined).
> A warning is issued if some names are not defined (NAs) or not unique.

Perhaps another option (more consistent(?) since the names() are still
unique) might be to just keep it as it is now, but add a DataFrame to
the GRangesList with something like a tx_name column if the user asks
for it?

(I didn't realize we could add DF's to *RangesList objects until I
reread some of the IRanges/GenomicFeatures vignettes)

This way the user will be assured of unique names in the GRangesList's
`names()` slot, but can get at the tx_name of the given list item via
something like:


And perhaps this extra DataFrame would only be added if exonsBy, etc.
function is called with a "with.names=TRUE" (instead of use.names).

Just brainstorming ...


>> If it pleases the court, I'd also like to S4-ize the `exons` and
>> `transcripts` functions (which currently work on TranscriptDb's) since
>> I'd like to use them as accessors for my Gene-like objects:
>> http://github.com/lianos/GenomicFeaturesX/blob/master/R/Gene-class.R
> Just to clarify, are you asking us to make these functions generic
> so you can write your own methods for your Gene-like objects?
> If nobody objects, I'll be happy to make this change.

Yes, that's what I'm asking -- I'd like functions like exonsBy, cdsBy,
transcripts, exons, etc. to be S4-ized (and allowed to take an '...'

Actually, a few days ago, I think I've more-or-less moved all of the
GenomicFeatures methods I'm trampling (S4-izing) over here, on line 37


Though I think you might find some of the other functions for
TranscriptDb objects on that page (simple as they may be) useful, such
as get/setMetadata, for instance.


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 Bioc-sig-sequencing mailing list