Skip to content
Prev 4768 / 21312 Next

[Bioc-devel] could bsseq::data.frame2GRanges be added to GenomicRanges

For any tabular data structure with "chr[om]" and one or more of starts, ends, widths, and strands, there _is_ an obvious mapping, though!  And I personally always have an optional argument to keep the rest as mcols(). It just seems so straightforward. 

The generic granges() method also suggests that people often want a way for  something that is not itself a GRanges to at least emit one. 

granges(foo) is also a lot easier than 

with(foo, GRanges(fairly,
                               Involved(),
                               Constructor,
                               ...)

It would be nice if everything were a bed, wig, BAM or similar. Then rtracklayer would be all anyone needs. But, sometimes in the course of events, an unenlightened soul will have their library emit a table of coordinates bearing information that would be more useful as a GRanges. Given the frequency with which this occurs, it's nice to have that generic. 

Anyways, this is all your fault!  If you hadn't built such a marvelously useful data structure, people wouldn't want to use it in ways you never intended. :-)

No good deed goes unpunished,

--t