methylRaw-class: An S4 class for holding raw methylation data from an...

Description Slots Details Subsetting Accessors Coercion Examples

Description

This object stores the raw mehylation data that is read in through read function and extends data.frame.The raw methylation data is basically percent methylation values and read coverage values per genomic base/region.

Slots

sample.id:

string for an identifier of the sample

assembly:

string for genome assembly, ex: hg18,hg19,mm9

context:

methylation context string, ex: CpG,CpH,CHH, etc.

resolution:

resolution of methylation information, 'base' or 'region'

Details

methylRaw class extends data.frame class therefore providing novice and experienced R users with a data structure that is well known and ubiquitous in many R packages.

Subsetting

In the following code snippets, x is a methylRaw. Subsetting by x[i,] will produce a new object if subsetting is done on rows. Column subsetting is not directly allowed to prevent errors in the downstream analysis. see ?methylKit[ .

Accessors

The following functions provides access to data slots of methylRaw: getData,getAssembly, getContext

Coercion

methylRaw object can be coerced to GRanges object via as function.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# example of a raw methylation data as a text file
read.table(system.file("extdata", "control1.myCpG.txt", 
                                package = "methylKit"),
                                    header=TRUE,nrows=5)

data(methylKit)

# example of a methylRaw object
head(methylRawList.obj[[1]])
str(head(methylRawList.obj[[1]]))

library(GenomicRanges)

#coercing methylRaw object to GRanges object
my.gr=as(methylRawList.obj[[1]],"GRanges")


Search within the methylKit package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.