Learn R Programming

M3D (version 1.6.2)

readENCODEdata: Reads in ENCODE RRBS data

Description

Reads in RRBS data in bed file format from the ENCODE consortium and outputs an rrbs data structure. Adapted from readBismark in the BiSeq package.

Usage

readENCODEdata(files, colData, eData = NaN)

Arguments

files
A character pointing the the rrbs files downloads from the ENCODE database.
colData
Samples' names plus additional sample information as character, data.frame or DataFrame.
eData
Experiment data to describe the work. This is used to create the BSraw object as in the BiSeq package.

Value

Returns a BSraw object storing methylation and coverage data - the underlying structure for this package.

Examples

Run this code

# download the files and change the working directory
# to that location
files <- c('wgEncodeHaibMethylRrbsH1hescHaibSitesRep1.bed.gz',
'wgEncodeHaibMethylRrbsH1hescHaibSitesRep2.bed.gz',
'wgEncodeHaibMethylRrbsK562HaibSitesRep1.bed.gz',
'wgEncodeHaibMethylRrbsK562HaibSitesRep2.bed.gz')
group <- factor(c('H1-hESC','H1-hESC','K562','K562'))
samples <- c('H1-hESC1','H1-hESC2','K562-1','K562-2')
colData <- DataFrame(group,row.names= samples)
rrbs <- readENCODEdata(files,colData)

Run the code above in your browser using DataLab