cpg.annotate: Annotate CpGs with their chromosome position and test...

Description Usage Arguments Value Author(s) References Examples

Description

Either: - Annotate a matrix/GenomicRatioSet representing 450K or EPIC data with probe weights (depending on analysis.type) and chromosomal position, or - Standardise this information from DSS:::DMLtest() to the same data format.

Usage

1
2
3
4
cpg.annotate(datatype = c("array", "sequencing"), object, what=c("Beta", "M"), 
             arraytype=c("EPIC", "450K"), analysis.type = c("differential", 
             "variability", "ANOVA", "diffVar"), design, contrasts = FALSE, 
             cont.matrix = NULL, fdr = 0.05, coef, ...) 

Arguments

datatype

Character string representing the type of data being analysed.

object

Either:

- A matrix of M-values, with unique Illumina probe IDs as rownames and unique sample IDs as column names or,

- A GenomicRatioSet, appropriately annotated or,

- Output from DSS:::DMLtest().

what

Does the data matrix contain Beta or M-values? Not needed if object is a GenomicRatioSet.

arraytype

Is the data matrix sourced from EPIC or 450K data? Not needed if object is a GenomicRatioSet.

analysis.type

"differential" for dmrcate() to return DMRs; "variability" to return VMRs; "ANOVA" to return "whole experiment" DMRs, incorporating all possible contrasts from the design matrix using the moderated F-statistics; "diffVar" to return differentially variable methylated regions, using the missMethyl package to generate t-statistics. All modes are applicable when datatype="array", but only "differential" is available when datatype="sequencing".

design

Study design matrix. Identical context to differential analysis pipeline in limma. Must have an intercept if contrasts=FALSE. Applies only when analysis.type %in% c("differential", "ANOVA", "diffVar"). Only applicable when datatype="array".

contrasts

Logical denoting whether a limma-style contrast matrix is specified. Only applicable when datatype="array" and analysis.type %in% c("differential", "diffVar").

cont.matrix

Limma-style contrast matrix for explicit contrasting. For each call to cpg.annotate, only one contrast will be fit. Only applicable when datatype="array" and analysis.type %in% c("differential", "diffVar").

fdr

FDR cutoff (Benjamini-Hochberg) for which CpG sites are individually called as significant. Used to index default thresholding in dmrcate(). Highly recommended as the primary thresholding parameter for calling DMRs. Not used when analysis.type = "variability".

coef

The column index in design corresponding to the phenotype comparison. Corresponds to the comparison of interest in design when contrasts=FALSE, otherwise must be a column name in cont.matrix. Only applicable when datatype="array" and analysis.type %in% c("differential", "diffVar").

...

Extra arguments passed to the limma function lmFit() (analysis.type="differential") or missMethyl function varFit() (analysis.type = "diffVar"), and when datatype="array".

Value

An object of class "annot", for passing to dmrcate, containing the vectors:

Author(s)

Tim J. Peters <t.peters@garvan.org.au>

References

Smyth, G. K. (2005). Limma: linear models for microarray data. In: Bioinformatics and Computational Biology Solutions using R and Bioconductor, R. Gentleman, V. Carey, S. Dudoit, R. Irizarry, W. Huber (eds.), Springer, New York, pages 397-420.

Feng, H., Conneely, K. N., & Wu, H. (2014). A Bayesian hierarchical model to detect differentially methylated loci from single nucleotide resolution sequencing data. Nucleic Acids Research, 42(8), e69.

Phipson, B., & Oshlack, A. (2014). DiffVar: a new method for detecting differential variability with application to methylation in cancer and aging. Genome Biol, 15(9), 465.

Peters T.J., Buckley M.J., Statham, A., Pidsley R., Samaras K., Lord R.V., Clark S.J. and Molloy P.L. De novo identification of differentially methylated regions in the human genome. Epigenetics & Chromatin 2015, 8:6, doi:10.1186/1756-8935-8-6.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
data(dmrcatedata)
myMs <- logit2(myBetas)
myMs.noSNPs <- rmSNPandCH(myMs, dist=2, mafcut=0.05)
patient <- factor(sub("-.*", "", colnames(myMs)))
type <- factor(sub(".*-", "", colnames(myMs)))
design <- model.matrix(~patient + type) 
myannotation <- cpg.annotate("array", myMs.noSNPs, what="M", arraytype = "450K",
                             analysis.type="differential", design=design, coef=39)

## End(Not run)

rcavalcante/DMRcate documentation built on May 21, 2019, 10:13 a.m.