order.region: Gets the sort order of a region index similar to the order...

Description Usage Arguments Author(s) References Examples

Description

Helps if you don't want to use sort region on a huge dataset

Usage

1
2
3
4
5
6
7
8
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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];

}

bedr documentation built on May 2, 2019, 11:36 a.m.

Related to order.region in bedr...