readBedRaw: Reads in RRBS data in raw format to be processed later

Description Usage Arguments Value Author(s) Examples

View source: R/readBedRaw.R

Description

Reads in RRBS data in bed file format from a variety of formats and outputs a list that is turned into an rrbs data structure in the wrapper function. Adapted from readBismark in the BiSeq package.

Usage

1
readBedRaw(files, colData, bed_type = "Encode")

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.

bed_type

Character string representing the style of the bed file. Options are

Value

Returns a list with all the data that will be turned into a BSraw object - the underlying structure for this package.

Author(s)

Tom Mayo t.mayo@ed.ac.uk

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# 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 <- readBedRaw(files,colData)

M3D documentation built on April 29, 2020, 5:59 a.m.