On Sun, Oct 24, 2010 at 11:02 AM, Steve Lianoglou <
mailinglist.honeypot@gmail.com> wrote:

> Hello,
>
> It being Sunday and all, here's a little story that I've got to tell
> (apologies in advance for indulging in some navel gazing):
>
> Once upon a time (yesterday) I found myself implementing a
> GappedRanges class[1] because I wanted to "talk about" and manipulate
> distances/etc. between two points that are aligned to "genomic" space,
> but really come from "transcriptome" space (so, I wanted to keep track
> of introns and things and subtract them away in results from calls to
> width() and its ilk).
>
> I thought I was being really clever and was liking how it was coming
> together. I was testing in all sorts of manner, and when I tried to
> have a column of a DataFrame hold my GappedRanges objects, I got some
> funny errors -- something about some "cnirl" slot.
>
> After some head scratching, I went digging through the IRanges source
> code -- lo and behold I found a GappedRanges class .. and it has a
> `cnirl` slot! I paused for a moment to recognize that whoever saw the
> need for this class and thought to implement it must surely be a
> prodigy in the truest sense of the word ...
>
> When my day dream had passed, I got to wondering how it was that I
> haven't stumbled across this class until now. I realized that no one
> really talks about GappedRanges on the mailing list(s) and there's no
> real mention of it in the IRangesOverview vignette. An `svn log` on
> the file shows no activity on it since December 2009, so I was
> wondering if this class was on its way out? Maybe someone thought it
> was a good idea to write it (greetings, kindred spirit) and has since
> come to the conclusion that maybe it's unnecessary (in which case, I'd
> appreciate some wisdom about that to save me some time :-)
>
> I was planning on implementing a findOverlaps method against
> GappedRanges that act "the normal way" but exclude any overlaps that
> fall within the gapped portion of the ranges ... but, I wanted to see
> where GappedRanges stands now before I proceed (and maybe just doing a
> findOverlaps against a GRangesList is close to the same thing).
> Perhaps I'd just be duplicating someone else's work, who's already
> found a better way to deal with the use cases this class (I think)
> would work well for.
>
> Anyway ... I was just curious about what's going on with the
> GappedRanges class. I find it's a natural fit for some things, even
> though I would grant you that you could probably twist a GRangesList
> into doing something similar.
>
>
It's still supported. I'm guessing it hasn't changed due to lack of use.
Therefore, no feature or bug requests. Could you please elaborate on why
GappedRanges is more convenient than GRangesList?

The assertion of normality in GappedRanges might be troublesome (e.g., could
not throw overlapping exons of a gene into the same element). GappedRanges
also wouldn't handle multi-chromosome features (even some genes are
annotated on multiple chromosomes). I guess GappedRanges::start() will
return a vector of the starts of GappedRanges, instead of an IntegerList,
but one just needs to call min() on that list to get around that.

For representing transcripts, we've been well served by GRangesList. If you
have spliced read alignments, consider GappedAlignments for those.

Michael

Thanks,
> -steve
>
> [1] My (partial) GappedRanges implementation:
> http://github.com/lianos/GenomicFeaturesX/blob/master/R/GappedRanges.R
>
> --
> 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<http://cbio.mskcc.org/%7Elianos/contact>
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>

	[[alternative HTML version deleted]]

