writeBED: Writes 'BSraw' and 'BSrel' data to a bed file suitable for...

Description Usage Arguments Details Value Author(s) See Also Examples

Description

The created bed files contains an entry for each CpG site. Strand information, relative methylation and absolute number of reads covering the CpG sites are stored. The relative methylation is indicated by colors: green via black to red for unmethylated to methylated.

Usage

1
writeBED(object, name, file)

Arguments

object

A BSraw or BSrel object.

name

Track names (sample names) written to the bed file's header.

file

Character vector with names of the bed file.

Details

The written bed file contains the following extra information:

  1. score: the relative methylation of the CpG site

  2. name: the coverage of the CpG site

  3. itemRgb: a color value visualizing the methylation score

A separate bed file is created for each sample in the given object. The lengths of the arguments name and file should equal the number of samples.

Value

Nothing. Bed files are written.

Author(s)

Hans-Ulrich Klein

See Also

readBismark

Examples

1
2
3
4
data(rrbs)
s1 <- rrbs[,1]
out <- tempfile(, fileext = ".bed")
writeBED(s1, name = colnames(s1), file = out)

BiSeq documentation built on Nov. 8, 2020, 8:05 p.m.