[Bioc-devel] "nearest" & related methods for GRangesList & friends?

Hervé Pagès hpages at fhcrc.org
Fri May 23 20:13:24 CEST 2014


Hi Ryan,

On 05/22/2014 03:38 PM, Ryan C. Thompson wrote:
> Hello,
>
> I recently found myself in want of a nearest method that handles
> GRangesList objects. Is there any plan to add one?

Not that I know of. I guess most of the times it's probably good enough
to call range() on both GRangesList objects before passing them to
nearest(). What's the use case for caring about "gaps" within each
GRangesList element?

> I just want to define
> "nearest" for elements of a GRangesList by the shortest distance between
> any query range and any subject range. Obviously I can do this by
> unlisting the GRangesList, calling nearest, and then post-processing to
> figure out which element of the original GRangesList includes the
> nearest range, but it would be nice to have a function that already does
> this for me.

The easy one is a "nearest" method between a GRanges and a GRangesList.
Is it what you need? That would cover finding the nearest gene or
transcript for ChIPseq peaks when the exon structure actually matters
(seems like it would matter only for peaks that fall inside more than
1 transcript).

Or do you need a method that operates on 2 GRangesList objects? Can't
think of a use case for that one. Finding the nearest gene or transcript
for junction reads?

Thanks,
H.


>
> -Ryan
>
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel

-- 
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpages at fhcrc.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319



More information about the Bioc-devel mailing list