MethyLumiSet object
1
0
Entering edit mode
Tim Triche ★ 4.2k
@tim-triche-3561
Last seen 13 months ago
United States
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]]
convert genoset minfi convert genoset minfi • 2.2k views
ADD COMMENT
1
Entering edit mode
Tim Triche ★ 4.2k
@tim-triche-3561
Last seen 13 months ago
United States
Should have added that coercion from a MethyGenoSet to a GenoSet is trivial: geno <- as(mgeno, 'GenoSet') class(geno) ## [1] "GenoSet" ## attr(,"package") ## [1] "genoset" Not sure why a person would want to do this, but if they did, it's quite simple. Best, --t On Mon, Apr 8, 2013 at 9:49 AM, Tim Triche, Jr. <tim.triche@gmail.com>wrote: > 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=""> > -- *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]]
ADD COMMENT

Login before adding your answer.

Traffic: 485 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6