percMethylation {methylKit} | R Documentation

## get percent methylation scores from methylBase or methylBaseDB object

### Description

get percent methylation scores from methylBase or methylBaseDB object

### Usage

    percMethylation(
      methylBase.obj,
      rowids = FALSE,
      save.txt = FALSE,
      chunk.size = 1e+06
    )

    ## S4 method for signature 'methylBase'
    percMethylation(methylBase.obj, rowids = FALSE)

    ## S4 method for signature 'methylBaseDB'
    percMethylation(
      methylBase.obj,
      rowids = FALSE,
      save.txt = FALSE,
      chunk.size = 1e+06
    )

### Arguments

`methylBase.obj` | a methylBase or methylBaseDB object
`rowids` | if TRUE, matrix rownames have identifiers as base/region location (default:FALSE)
`save.txt` | if TRUE, the matrix will be written to a text file, but only for methylBaseDB objects (default: FALSE)
`chunk.size` | Number of rows to be taken as a chunk for processing the `methylBaseDB` objects (default: 1e6)

### Value

matrix with percent methylation values per base/region across all samples, row names would be base/region identifiers

### Details

The parameter `chunk.size` is only used when working with `methylBaseDB` objects, as they are read in chunk by chunk to enable processing large-sized objects which are stored as flat file database. Per default the chunk.size is set to 1M rows, which should work for most systems. If you encounter memory problems or have a high amount of memory available feel free to adjust the `chunk.size`.

### Examples

    data(methylKit)
    mat=percMethylation(methylBase.obj)
    head(mat)

[Package methylKit version 1.16.1 Index]