fread.bed: Load bed file as GRanges

Description Usage Arguments Value See Also Examples

View source: R/utils_imports.R

Description

Wraps around 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

Usage

1
fread.bed(filePath, chrStyle = NULL)

Arguments

filePath

The location of the bed file

chrStyle

a GRanges object, TxDb, FaFile, or a seqlevelsStyle (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

See Also

Other utils: bedToGR(), convertToOneBasedRanges(), export.bed12(), export.wiggle(), fimport(), findFa(), optimizeReads(), readBam(), readWig()

Examples

1
2
3
4
# path to example CageSeq data from hg19 heart sample
cageData <- system.file("extdata", "cage-seq-heart.bed.bgz",
                        package = "ORFik")
fread.bed(cageData)

ORFik documentation built on March 27, 2021, 6 p.m.