%in.region% {bedr}R Documentation

checks if regions in object a are found in object b

Description

checks if regions in object a are found in object b

Usage

x %in.region% y

Arguments

x

first region index in the form chr:start-stop. regions in this index will be checked for intersection in the values of the second index.

y

second region index.

Details

The function can also be called using syntax similar to the %in% operator, for example "region1 %in.region% region2"

Value

Returns a logical vector the length of x.

Author(s)

Daryl Waggott

Examples

if (check.binary("bedtools")) {

index <- get.example.regions();

a <- index[[1]];
b <- index[[2]];
a <- bedr.sort.region(a);
b <- bedr.sort.region(b);

d <- a %in.region% b

}

[Package bedr version 1.0.7 Index]