Entering edit mode
Code chunks inline. If you don't have a MethyLumiSet named PBLs, make
one
;-)
Three chunks below:
MethyLumiSet to MethyLumiM, MethyLumiM to MethyGenoSet,
and minfi classes to MethyGenoSet. This may be of use to a number of
people.
## =====
## MethyLumiSet to MethyLumiM:
library(lumi)
load("PBLs.rda") ## happened to be lying around; some 450k data
class(PBLs)
## [1] "MethyLumiSet"
## attr(,"package")
## [1] "methylumi"
PBLs.mlumi <- as(PBLs, 'MethyLumiM')
class(PBLs.mlumi)
## [1] "MethyLumiM"
## attr(,"package")
## [1] "methylumi"
## =====
## MethyLumiM to MethyGenoSet:
library(methyAnalysis)
class?MethyGenoSet
mgeno <- MethyLumiM2GenoSet(PBLs.mlumi)
## Loading required package: IlluminaHumanMethylation450k.db
## Warning: 'IlluminaHumanMethylation450k.db' is deprecated.
## Use 'FDb.InfiniumMethylation.hg19' instead.
## Use 'FDb.InfiniumMethylation.hg18' instead.
## Use 'mapToGenome() function in minfi or methylumi' instead.
## See help("Deprecated")
class(mgeno)
## [1] "MethyGenoSet"
## attr(,"package")
## [1] "methyAnalysis"
## =====
## Another way of doing this sort of thing (coming from minfi):
require(minfi)
require(minfiData)
datSwan <- preprocessSWAN(RGsetEx)
## Loading required package: IlluminaHumanMethylation450kmanifest
## Normalizing array 1 of 6
## Normalizing array 2 of 6
## Normalizing array 3 of 6
## Normalizing array 4 of 6
## Normalizing array 5 of 6
## Normalizing array 6 of 6
gmset <- mapToGenome(datSwan)
## Loading required package:
IlluminaHumanMethylation450kannotation.ilmn.v1.2
class(gmset)
## [1] "GenomicMethylSet"
## attr(,"package")
## [1] "minfi"
gmgeno <- MethyGenoSet(locData=as(granges(gmset), 'RangedData'),
exprs=getM(gmset),
methylated=getMeth(gmset),
unmethylated=getUnmeth(gmset),
pData=as.data.frame(pData(gmset)),
annotation=annotation(gmset))
class(gmgeno)
## [1] "MethyGenoSet"
## attr(,"package")
## [1] "methyAnalysis"
Best,
--t
On Mon, Apr 8, 2013 at 4:33 AM, Zengxiang Pan <z.pan@auckland.ac.nz>
wrote:
> Dear Tim,
>
> ** ** **
>
> Could you please tell me if there is a present way to convert a
> MethyLumiSet object to GenoSet or MethyLumiM object. Many thanks!
>
> ** **
>
> My best,
>
> Zengxiang
>
>
--
*A model is a lie that helps you see the truth.*
*
*
Howard
Skipper<http: cancerres.aacrjournals.org="" content="" 31="" 9="" 1173.full.pdf="">
[[alternative HTML version deleted]]