readBed {genomation} | R Documentation |
The function reads a BED file that contains location and other information
on genomic features and returns a GRanges
object.
The minimal information that the BED file has to have is chromosome,
start and end columns. it can handle all BED formats up to 12 columns.
readBed(file, track.line = FALSE, remove.unusual = FALSE, zero.based = TRUE)
file |
location of the file, a character string such as: "/home/user/my.bed"
or the input itself as a string (containing at least one \n).
The file can end in |
track.line |
the number of track lines to skip, "auto" to detect them automatically or FALSE(default) if the bed file doesn't have track lines |
remove.unusual |
if TRUE remove the chromosomes with unsual names, such as chrX_random (Default:FALSE) |
zero.based |
a boolean which tells whether the ranges in the bed file are 0 or 1 base encoded. (Default: TRUE) |
GRanges
object
my.file=system.file("extdata","chr21.refseq.hg19.bed",package="genomation") refseq = readBed(my.file,track.line=FALSE,remove.unusual=FALSE) head(refseq)