This class holds preprocessed data for Illumina methylation
microarrays.
Usage
## Constructor
MethylSet(Meth, Unmeth, phenoData, annotation = NULL)
## Data extraction / Accessors
## S4 method for signature 'MethylSet'
getMeth(object)
## S4 method for signature 'MethylSet'
getUnmeth(object)
## S4 method for signature 'MethylSet'
getBeta(object, type = "", offset = 0, betaThreshold = 0)
## S4 method for signature 'MethylSet'
getM(object, type = "", ...)
## S4 method for signature 'MethylSet'
getCN(object, ...)
## S4 method for signature 'MethylSet'
getManifest(object)
## S4 method for signature 'MethylSet'
preprocessMethod(object)
## Utilities
dropMethylationLoci(object, dropRS = TRUE, dropCH = TRUE)
Arguments
object
A MethylSet.
Meth
A matrix of methylation values (between zero and infinity)
with each row being a methylation loci and each column a sample.
Unmeth
See the Meth argument.
phenoData
a phenoData object.
annotation
An annotation string, optional.
type
How are the values calculated? For getBeta setting
type="Illumina" sets offset=100 as per Genome Studio.
For getM setting type="" computes M-values as the
logarithm of Meth/Unmeth, otherwise it is computed as
the logit of getBeta(object).
offset
Offset in the beta ratio, see detail.
betaThreshold
Constrains the beta values to be in the inverval
betwen betaThreshold and 1-betaThreshold.
dropRS
Should SNP probes be dropped?
dropCH
Should CH probes be dropped
...
For the constructor: additional objects passes to the
eSet constructor, particular a phenoData slot. For
getM these values gets passed onto getBeta.
Details
This class inherits from eSet. Essentially the class is a representation of a
Meth matrix and a Unmeth matrix linked to a pData data frame.
In addition, an annotation and a preprocessMethod slot is present. The annotation slot describes
the type of array and also which annotation package to use. The preprocessMethod slot describes
the kind of preprocessing that resulted in this dataset.
A MethylSet stores meth and Unmeth. From these it is easy to compute Beta
values, defined as
Beta = Meth / (Meth + Unmeth + offset)
The offset is chosen to avoid dividing with small values. Illumina uses a default of 100.
M-values (an unfortunate bad name) are defined as
M = logit(Beta) = log( Meth / Unmeth )
This formula has problems if either Meth or Unmeth is zero. For this reason, we can use
betaThreshold to make sure Beta is neither 0 nor 1, before taken the logit. What makes
sense for the offset and betaThreshold depends crucially on how the data was
preprocessed. Do not expect the default values to be particular good.
Constructor
Instances are constructed using the MethylSet function with the
arguments outlined above.
Accessors
In the following code, object is a MethylSet.
getMeth(object), getUnmeth(object)
Get the
Meth or the Unmeth matrix
getBeta(object)
Get Beta, see details.
getM(object)
get M-values, see details.
getCN(object)
get copy number values which are defined
as the sum of the methylation and unmethylation channel.
getManifest(object)
get the manifest associated with
the object.
preprocessMethod(object)
Get the preprocess method character.
Utilities
In the following code, object is a MethylSet.
dropMethylationLoci(object)
A unifed interface to removing methylation loci. You
can drop SNP probes (probes that measure SNPs, not probes containing SNPs) or CH probes (non-CpG
methylation).
eSet for the basic class structure.
Objects of this class are typically created from an
RGChannelSet using preprocessRaw or
another preprocessing function.
Examples
showClass("MethylSet")
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(minfi)
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
rbind, rownames, sapply, setdiff, sort, table, tapply, union,
unique, unsplit
Loading required package: Biobase
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
Loading required package: lattice
Loading required package: GenomicRanges
Loading required package: S4Vectors
Loading required package: stats4
Attaching package: 'S4Vectors'
The following objects are masked from 'package:base':
colMeans, colSums, expand.grid, rowMeans, rowSums
Loading required package: IRanges
Loading required package: GenomeInfoDb
Loading required package: SummarizedExperiment
Loading required package: Biostrings
Loading required package: XVector
Loading required package: bumphunter
Loading required package: foreach
Loading required package: iterators
Loading required package: locfit
locfit 1.5-9.1 2013-03-22
Setting options('download.file.method.GEOquery'='auto')
Setting options('GEOquery.inmemory.gpl'=FALSE)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/minfi/MethylSet-class.Rd_%03d_medium.png", width=480, height=480)
> ### Name: MethylSet-class
> ### Title: MethylSet instances
> ### Aliases: MethylSet-class MethylSet getMeth getUnmeth getBeta getM
> ### preprocessMethod getMeth,MethylSet-method getUnmeth,MethylSet-method
> ### getBeta,MethylSet-method getM,MethylSet-method getCN,MethylSet-method
> ### preprocessMethod,MethylSet-method getManifest,MethylSet-method
> ### show,MethylSet-method initialize,MethylSet-method dropMethylationLoci
>
> ### ** Examples
>
> showClass("MethylSet")
Class "MethylSet" [package "minfi"]
Slots:
Name: preprocessMethod assayData phenoData
Class: character AssayData AnnotatedDataFrame
Name: featureData experimentData annotation
Class: AnnotatedDataFrame MIAxE character
Name: protocolData .__classVersion__
Class: AnnotatedDataFrame Versions
Extends:
Class "eSet", directly
Class "VersionedBiobase", by class "eSet", distance 2
Class "Versioned", by class "eSet", distance 3
>
>
>
>
>
> dev.off()
null device
1
>