Description Usage Arguments Details Value Author(s) References Examples
checks if regions in object a are found in object b
1 2 3 4 5 6 7 8 9 10 11 12 |
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. |
proportion.overlap |
Defaults 1e-9 which is 1 bp. See details below for the different interpretation between 0 and 1 based overlap |
reciprocal.overlap |
Should the proportion.overlap be reciprocal |
check.zero.based |
should 0 based coordinates be checked |
check.chr |
should chr prefix be checked |
check.valid |
check if region is valid |
check.sort |
check if region is sorted |
check.merge |
check if overlapping regions are merged |
verbose |
prints some debugging information. currently it just checks if the input regions are overlapping |
The function can also be called using syntax similar to the %in% operator, for example "region1 %in.region% region2"
The default is to report TRUE if there is 1bp overlap in zero based bed format. That means that region chr1:10-20 and chr1:20-30 would not overlap. To switch to one based intuitive interpretation set proportion.overlap = 0.
Returns a logical vector the length of x.
Daryl Waggott
http://bedtools.readthedocs.org/en/latest/content/tools/intersect.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | if (check.binary("bedtools")) {
index <- get.example.regions();
a <- index[[1]];
b <- index[[2]];
a <- bedr(engine = "bedtools", input = list(i = a), method = "sort", params = "");
b <- bedr(engine = "bedtools", input = list(i = b), method = "sort", params = "");
d <- in.region(a,b);
# alternative calling
d <- a %in.region% b
}
|
sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied
######################
#### bedr v1.0.7 ####
######################
checking binary availability...
* Checking path for bedtools... FAIL
* Checking path for bedops... FAIL
* Checking path for tabix... FAIL
tests and examples will be skipped on R CMD check if binaries are missing
* Checking path for bedtools... sh: 1: cannot create /dev/null: Permission denied
FAIL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.