convert2bed {bedr} | R Documentation |
convert object to bed format
Description
checks if an object can be converted into a bed style data.frame then does the conversion.
Usage
convert2bed(
x,
set.type = TRUE,
check.zero.based = TRUE,
check.chr = TRUE,
check.valid = TRUE,
check.sort = TRUE,
check.merge = TRUE,
verbose = TRUE
)
Arguments
x |
A region index (i.e. chr1:10-100, ...) either as a vector or row.names/first column of a data.frame. Or a data.frame with the first three columns "chr", s"start", "end" |
set.type |
should the attribute input.type be set. Sometimes it is desirable to avoid setting it when applying intermediate conversion |
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.sort |
should the region be checked to see if it is sorted |
check.merge |
should the region be checked for overlapping regions |
verbose |
messages and text |
Details
Very useful to convert data before using other bedr functions
Value
Returns x converted to bedformat, as a data frame
Author(s)
Daryl Waggott
Examples
## Not run:
a.bed <- convert.to.bed(a)
## End(Not run)
[Package bedr version 1.0.7 Index]