rnb.RnBSet.to.bed {RnBeads} | R Documentation

## Export to BED files

### Description

Exports the beta values from a methylation dataset to BED files.

### Usage

    rnb.RnBSet.to.bed(rnb.set, out.dir, reg.type = "sites",
      names.quant.meth = TRUE, add.track.line = TRUE,
      lexicographic = FALSE, verbose = TRUE)

### Arguments

`rnb.set` | Methylation dataset as an object of type inheriting `RnBSet`.
`out.dir` | Output directory. If not existing, it will be created. otherwise files in that directory are overwritten.
`reg.type` | Region type to be extracted.
`names.quant.meth` | should the names of the bed regions contain information on the methylation level. If TRUE the following format is applied: meth_percent `covg(rnb.set)` is not NULL
`add.track.line` | Add a track line to the bed file to enable browsers like IGV to display the data better
`lexicographic` | Should lexicographic ordering be used for chromosome names
`verbose` | More detailed logger output

### Details

Details on the BED file format can be found in the UCSC Genome Browser documentation. Each methylation site is an entry in the resulting bed file. The Score column corresponds to a site's methylation value in the interval `[0,1]`.

### Value

(invisibly) a summary list containing information on the conversion step. elements are `filenames` (a table containing information on which sample has been written to what filename) and `assembly` (a string indicating the assembly used by `rnb.set`).

### Author(s)

Fabian Mueller

### Examples

    library(RnBeads.hg19)
    data(small.example.object)
    logger.start(fname=NA)
    rnb.RnBSet.to.bed(rnb.set.example,tempdir())

[Package RnBeads version 2.4.0 Index]