Learn R Programming

BiSeq (version 1.12.0)

writeBED: Writes BSraw and BSrel data to a bed file suitable for the IGV

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

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.

Value

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.

See Also

readBismark

Examples

Run this code
data(rrbs)
s1 <- rrbs[,1]
out <- tempfile(, fileext = ".bed")
writeBED(s1, name = colnames(s1), file = out)

Run the code above in your browser using DataLab