order.region {bedr} | R Documentation |
Gets the sort order of a region index similar to the order command
Description
Helps if you don't want to use sort region on a huge dataset
Usage
order.region(
x,
method = "lex",
check.zero.based = TRUE,
check.chr = TRUE,
check.valid = TRUE,
check.merge = TRUE
)
Arguments
x |
index or bed style data.frame |
method |
natural or lexicographical (lex) |
check.zero.based |
should 0 based coordinates be checked |
check.chr |
should chr prefix be checked |
check.valid |
check if region is valid |
check.merge |
check if region is sorted and merged |
Author(s)
Daryl Waggott
References
http://bedtools.readthedocs.org/en/latest/content/tools/intersect.html
Examples
if (check.binary("bedtools")) {
index <- get.example.regions();
a <- index[[1]];
a <- bedr(engine = "bedtools", input = list(i = a), method = "sort", params = "");
a.order <- order.region(a)
b <- a[a.order];
}
[Package bedr version 1.0.7 Index]