fread.bed {ORFik} | R Documentation

## Load bed file as GRanges

### 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

    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.bigWig()`, `export.wiggle()`, `fimport()`, `findFa()`, `optimizeReads()`, `readBam()`, `readBigWig()`, `readWig()`

### Examples

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

[Package ORFik version 1.12.13 Index]