Question: MethyLumiSet object
0
gravatar for Tim Triche
6.4 years ago by
Tim Triche4.2k
United States
Tim Triche4.2k 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=""> [[alternative HTML version deleted]]
convert genoset minfi • 1.9k views
ADD COMMENTlink modified 6.4 years ago • written 6.4 years ago by Tim Triche4.2k
Answer: MethyLumiSet object
1
gravatar for Tim Triche
6.4 years ago by
Tim Triche4.2k
United States
Tim Triche4.2k wrote:
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 COMMENTlink written 6.4 years ago by Tim Triche4.2k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 125 users visited in the last hour