methylation_hooks: Hook functions to extract methylation

Description Usage Arguments Details Examples

Description

Hook functions to extract methylation

Usage

1
methylation_hooks(..., RESET = FALSE, READ.ONLY = NULL, LOCAL = FALSE)

Arguments

...

Arguments for the parameters, see "details" section

RESET

reset to default values

READ.ONLY

whether only return read-only options

LOCAL

switch local mode

Details

Methylation from whole genome bisulfite seuqencing is always huge and it does not make sense to read them all into the memory. This hook sets how to read the methylation data and how to return methylation value (e.g. CpG coverage, methylation rate...)

There are following hooks:

set

set a chromosome. The function accepts a single chromosome name and returns an object which is used as the first argument in other functions

meth

how to extract methylation value. The function should have three arguments: the object returned from set(), index of rows and index of columns. Normally, the first argument (obj) can be ignored when calling this hook. Note the methylation matrix should be column names (used as sample id in other functions)

raw

how to extract raw methylation value, same setting as meth

site

the function should return a vector of CpG sites

coverage

how to extract CpG coverage, same setting as meth.

GRanges

howt to extract CpG sites as a GRanges object.

Note: positions of CpG sites in a chromosome should be sorted.

Examples

1
2
# There is no example
NULL

jokergoo/cotools documentation built on May 19, 2019, 6:24 p.m.