binning {methimpute} | R Documentation

## Methimpute binning functions

### Description

This page provides an overview of all methimpute binning functions.

### Usage

    binCounts(data, binsize)

    binPositions(data, binsize)

    binMethylome(data, binsize, contexts = "total", columns.average = NULL)

### Arguments

`data` | A `GRanges-class` object with metadata columns 'context' and 'counts' (which is a matrix with columns 'methylated' and 'total').
`binsize` | The window size used for binning.
`contexts` | A character vector with contexts for which the binning will be done.
`columns.average` | A character vector with names of columns in `data` that should be averaged in bins.

### Value

A `GRanges-class` object for `binCounts` and `binPostions`. A `list()` of `GRanges-class` objects for `binMethylome`.

### Functions

- `binCounts`: Get the aggregated number of counts in each bin (no context).

- `binPositions`: Get the number of cytosines in each bin (total and per context).

- `binMethylome`: Get number of cytosines and aggregated counts for the specified contexts.

### Examples

    ## Get some toy data
    file <- system.file("data","arabidopsis_toydata.RData",
                        package="methimpute")
    data <- get(load(file))
    print(data)
    ## Bin the data in various ways
    binCounts(data, binsize=1000)
    binPositions(data, binsize=1000)
    binMethylome(data, binsize=1000, contexts=c("total", "CG"),
                columns.average=NULL)

[Package methimpute version 1.6.0 Index]