read.bed {BayesPeak} | R Documentation |
Read a .bed file into a data frame, but only the chr, start, end and strand columns.
read.bed(filename, chr)
filename |
Character - The path to the .bed file in question. |
chr |
Character vector, specifying which chromosomes to read in. Chromosome names must be specified exactly as they appear in the .bed files. If |
The purpose of this function is to extract 4 columns from a bed file: chromosome, start, end and strand. These are assumed to be in columns 1, 2, 3 and 6 respectively.
If the first line begins with "track" then it will be skipped.
The strand sense is expected to be given as "+"/"-".
A RangedData object, split into spaces by chromosome. This object has a "strand" data track.
See the IRanges package vignette for more information.
Jonathan Cairns
UCSC BED format FAQ - http://genome.ucsc.edu/FAQ/FAQformat.html#format1
dir <- system.file("extdata", package="BayesPeak") file <- file.path(dir, "H3K4me3reduced.bed") treatment <- read.bed(file) treatment