read.single.bed {RnBeads} | R Documentation

## read.single.bed

### Description

reads a BED file with methylation information

### Usage

    read.single.bed(
      file,
      chr.col = 1L,
      start.col = 2L,
      end.col = 3L,
      strand.col = 6L,
      mean.meth.col = 7L,
      coverage.col = 8L,
      c.col = NA,
      t.col = NA,
      is.epp.style = FALSE,
      coord.shift = 0L,
      ffread = FALSE,
      context = "cg",
      ...
    )

### Arguments

`file` | the input BED file
`chr.col` | chromosome column index
`start.col` | start column index
`end.col` | end column index
`strand.col` | strand column index
`mean.meth.col` | mean methylation column index
`coverage.col` | column with coverage information
`c.col` | converted C counts column index
`t.col` | unconverted C counts column index
`is.epp.style` | Flag for custom Broad Epigenome Pipeline (EPP) bed style (columns `"chrom"`, `"start"`, `"end"`, `"methylated_count/total_count"`, `"meth_score_scaled_0_1000"` and `"strand"` in this order). Setting this to `TRUE` overwrites all other parameters except `file`, and also neglects `...`.
`coord.shift` | An integer specifying the coordinate adjustment applied to the start and end coordinates.
`ffread` | Use `ff` package functionality
`context` | prefix for the output rownames
`...` | further arguments to `read.table` or `read.table.ffdf`

### Details

Missing columns should be assigned with `NA`. In case `mean.meth.col` is absent at least `coverage.col` and one of `c.col` or `t.col` should be specified.

### Value

a `data.frame` or `ff.data.frame` object with DNA methylation and coverage information. The row names are formed by the following convension: `context\.read.delim(file,...)[,chr.col]\.read.delim(file,...)[,start.col]\.read.delim(file,...)[,strand.col]`.

### Author(s)

Pavlo Lutsik

[Package RnBeads version 2.12.2 Index]