MethylationSetMethylationSet using from a matrix of beta values and
a data.frame of phenotypes.
prepareMethylationSet(matrix, phenotypes, annotation = "IlluminaHumanMethylation450kanno.ilmn12.hg19", chromosome = "chr", position = "pos", genes = "UCSC_RefGene_Name", group = "UCSC_RefGene_Group", filterNA_threshold = 0.05, verbose = FALSE)minfi object can be used to.minfi
object, phenotypes can be taken from it.MethylationSet with phenotypes and annotation.
MethylationSet.
Rigth now, prepareMethylationSet supports two entry points: a minfi
object and a matrix of betas.Phenotypes are compulsory and can be supplied as data.frame or AnnotatedDataFrame.
By default, annotation is taken from minfi package and
IlluminaHumanMethylation450kanno.ilmn12.hg19 package is used, being the
default arguments adapted to use this annotation. To use this annotation,
IlluminaHumanMethylation450kanno.ilmn12.hg19 must be installed and
methylation sites must be named like in Illumina 450k chip. Use of this annotation
ensures correct results in all the analysis.
If custom annotation is desired, there are two compulsory features: chromosomes and
positions. Chromosomes should be supplied in the character form (e.g. chr1). Two
additional features will be used during the presentation of results but not during
the analyses: genes and group. Genes are the gene names of the genes around the cpg
site and group defines the groups of the genes. Both columns will appear in the
results but they are not used through the workflow. It should be noticed that BlockFinder
only supports minfi annotation, so it is not advised to be used with custom
annotation.
if (require(minfiData)){
betas <- getBeta(MsetEx)[1:1000, ]
pheno <- pData(MsetEx)
set <- prepareMethylationSet(betas, pheno)
}
Run the code above in your browser using DataLab