methylBase-class | R Documentation |
This class is designed to contain methylation information such as coverage,
number of methylated bases, etc..
The methylation events contained in the class must be sampled in multiple
experiments (ex: only CpG bases covered in multiple experiments are stored
in the object of this class).
The class extends data.frame
and creates an object that holds
methylation information and genomic location.
The object belonging to this class is produced by unite
function.
sample.ids
:character vector for ids of samples in the object
assembly
:name of the genome assembly
context
:context of methylation. Ex: CpG,CpH,CHH, etc
treatment
:treatment vector denoting which samples are test and control
coverage.index
:vector denoting which columns in the data correspons to coverage values
numCs.index
:vector denoting which columns in the data correspons to number of methylatedCs values
numTs.index
:vector denoting which columns in the data correspons to number of unmethylated Cs values
destranded
: logical value. If TRUE
object is destranded, if FALSE
it is not.
resolution
:resolution of methylation information, allowed values: 'base' or 'region'
methylBase
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.
In the following code snippets, x
is a methylBase
.
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[ .
The following functions provides access to data slots of methylDiffDB:
- getData
: get the data slot from the methylKit objects,
- getAssembly
: get assembly of the genome,
- getContext
: get the context of methylation
methylBase
object can be coerced to
GRanges
object via as
function.
data(methylKit)
library(GenomicRanges)
my.gr=as(methylBase.obj,"GRanges")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.