[Bioc-devel] %outside% on GRanges

Oleksii Nikolaienko o|ek@||@n|ko|@|enko @end|ng |rom gm@||@com
Wed May 26 17:21:03 CEST 2021


Thanks very much for the explanation, Jim.

Best,
Oleksii

On Wed, 26 May 2021 at 16:28, James W. MacDonald <jmacdon using uw.edu> wrote:

> Hi Oleksii,
>
> That function is just a simplification of the negation of overlapsAny:
>
> > getAnywhere("%outside%")
> A single object matching '%outside%' was found
> It was found in the following places
>   package:IRanges
>   namespace:IRanges
> with value
>
> function (query, subject)
> !overlapsAny(query, subject)
> <bytecode: 0x00000000120f7218>
> <environment: namespace:IRanges>
>
> And overlapsAny has dispatch on Granges objects via inheritance from the
> Vector class.
>
> > showMethods("overlapsAny")
> Function: overlapsAny (package IRanges)
> query="GRanges", subject="GRanges"
>     (inherited from: query="Vector", subject="Vector")
> query="integer", subject="Vector"
> query="IntegerRangesList", subject="IntegerRangesList"
> query="Vector", subject="missing"
> query="Vector", subject="Vector"
>
> So far as I can tell there is no code in GenomicRanges to make this happen
> - it just dispatches via inheritance - so there is no direct help page in
> GenomicRanges.
>
> Best,
>
> Jim
>
>
>
>
> -----Original Message-----
> From: Bioc-devel <bioc-devel-bounces using r-project.org> On Behalf Of Oleksii
> Nikolaienko
> Sent: Wednesday, May 26, 2021 9:15 AM
> To: bioc-devel using r-project.org
> Subject: [Bioc-devel] %outside% on GRanges
>
> Dear Bioc team,
> %outside% operator from IRanges works as one would expect even if GRanges
> objects are supplied as operands:
>
>
> > a <- as("chr1:100-200", "GRanges")
> > b <- as("chr2:150-250", "GRanges")
> > IRanges::`%outside%`(a, b)
> [1] TRUE
>
> > IRanges::`%outside%`(ranges(a), ranges(b))
> [1] FALSE
>
> It is correct and intuitive, but %outside% does not seem to be defined or
> included in help pages of the GenomicRanges library. Can I rely on such
> behaviour of %outside% in the future?
>
> Best,
> Oleksii Nikolaienko
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioc-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>

	[[alternative HTML version deleted]]



More information about the Bioc-devel mailing list