Learn R Programming

bedr (version 1.1.3)

bedr.sort.region: sort a region file

Description

sort a region file

Usage

bedr.sort.region(
	x,
	method = "lexicographical",
	engine = "R",
	chr.to.num = c("X" = 23, "Y" = 24, "M" = 25),
	check.zero.based = TRUE,
	check.chr = TRUE,
	check.valid = TRUE,
	check.merge = TRUE,
	verbose = TRUE
	)

Arguments

x

a region object or index

method

natural or lexicographic

engine

what analytical engine to use for sorting i.e. bedtools, bedops, gnu unix

chr.to.num

chromosome letter names to numbers map. Defaults to Homo sapiens i.e c("X" = 23, "Y" = 24, "M" = 25)

check.zero.based

should 0 based coordinates be checked

check.chr

should chr prefix be checked

check.valid

should the region be checked for integerity

check.merge

should overlapping regions be checked

verbose

should log messages and checking take place

Author

Daryl Waggott

References

http://bedtools.readthedocs.io/en/latest/content/tools/sort.html

Examples

Run this code
if (check.binary("bedtools")) {

index <- get.example.regions();
a <- index[[1]];
b <- bedr.sort.region(a);

}

Run the code above in your browser using DataLab