% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{fread.bed}
\alias{fread.bed}
\title{Load bed file as GRanges.}
\usage{
fread.bed(filePath, chrStyle = NULL)
}
\arguments{
\item{filePath}{The location of the bed file}

\item{chrStyle}{a GRanges object, or a character style (Default: NULL) to
get seqlevelsStyle from. Is chromosome 1 called chr1 or 1, is mitocondrial
chromosome called MT or chrM etc. Will use 1st seqlevel-
style if more are present. Like: c("NCBI", "UCSC") -> pick "NCBI"}
}
\value{
a GRanges object
}
\description{
Wraps around rtracklayer::import.bed and tries to speed up loading with the
use of data.table. Supports gzip, gz, bgz and bed formats.
Also safer chromosome naming with the argument chrStyle
}
\examples{
# path to example CageSeq data from hg19 heart sample
cageData <- system.file("extdata", "cage-seq-heart.bed.bgz",
                        package = "ORFik")
fread.bed(cageData)

}
\seealso{
Other utils: \code{\link{bedToGR}},
  \code{\link{convertToOneBasedRanges}},
  \code{\link{findFa}}, \code{\link{optimizeReads}},
  \code{\link{readBam}}, \code{\link{readWig}}
}
\concept{utils}
