Search
Question: methyAnalysis - changes to GenoSet
0
gravatar for Lavinia Gordon
4.7 years ago by
Lavinia Gordon480 wrote:
Dear Bioc users, I have just tried the example code supplied with the package methyAnalysis and am getting an error: > ################################################### > ### code chunk number 3: Slide-window smoothing of the DNA methylation data > ################################################### > methyGenoSet.sm <- smoothMethyData(exampleMethyGenoSet, winSize = 250) Smoothing Chromosome 21 ... Note: Method with signature âGenoSet#character#ANY#ANYâ chosen for function â[â, target signature âMethyGenoSet#character#character#missingâ. "MethyGenoSet#ANY#ANY#ANY" would also be valid Warning message: The ranges method on a GenoSet is depricated. Please use space(locData(x)) or seqnames(locData(x)) as appropriate for RangedData or GRanges. > methyGenoset.sm Error: object 'methyGenoset.sm' not found > sessionInfo() R version 2.15.2 (2012-10-26) Platform: x86_64-redhat-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 [2] LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 [4] LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8 [6] LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=C [8] LC_NAME=C [9] LC_ADDRESS=C [10] LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 [12] LC_IDENTIFICATION=C attached base packages: [1] grid stats graphics grDevices [5] utils datasets methods base other attached packages: [1] methyAnalysis_1.0.0 org.Hs.eg.db_2.8.0 [3] RSQLite_0.11.2 DBI_0.2-5 [5] AnnotationDbi_1.20.5 Biobase_2.18.0 [7] IRanges_1.16.6 BiocGenerics_0.4.0 loaded via a namespace (and not attached): [1] affy_1.36.1 affyio_1.26.0 [3] annotate_1.36.0 BiocInstaller_1.8.3 [5] biomaRt_2.14.0 Biostrings_2.26.3 [7] biovizBase_1.6.2 bitops_1.0-5 [9] BSgenome_1.26.1 cluster_1.14.3 [11] colorspace_1.2-1 dichromat_2.0-0 [13] genefilter_1.40.0 GenomicFeatures_1.10.2 [15] GenomicRanges_1.10.7 genoset_1.10.1 [17] Gviz_1.2.1 Hmisc_3.10-1 [19] KernSmooth_2.23-9 labeling_0.1 [21] lattice_0.20-13 lumi_2.10.0 [23] MASS_7.3-23 Matrix_1.0-11 [25] methylumi_2.4.0 mgcv_1.7-22 [27] munsell_0.4 nleqslv_2.0 [29] nlme_3.1-108 parallel_2.15.2 [31] plyr_1.8 preprocessCore_1.20.0 [33] RColorBrewer_1.0-5 RCurl_1.95-4.1 [35] Rsamtools_1.10.2 rtracklayer_1.18.2 [37] scales_0.2.3 splines_2.15.2 [39] stats4_2.15.2 stringr_0.6.2 [41] survival_2.37-4 tools_2.15.2 [43] XML_3.95-0.2 xtable_1.7-1 [45] zlibbioc_1.4.0 > With regards, Lavinia Gordon Senior Research Officer Quantitative Sciences Core, Bioinformatics Murdoch Childrens Research Institute The Royal Children's Hospital Flemington Road Parkville Victoria 3052 Australia T 03 8341 6221 www.mcri.edu.au<http: www.mcri.edu.au=""/> ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ [[alternative HTML version deleted]]
ADD COMMENTlink modified 4.7 years ago by Martin Morgan ♦♦ 20k • written 4.7 years ago by Lavinia Gordon480
0
gravatar for Martin Morgan
4.7 years ago by
Martin Morgan ♦♦ 20k
United States
Martin Morgan ♦♦ 20k wrote:
On 03/07/2013 08:23 PM, Lavinia Gordon wrote: > Dear Bioc users, > I have just tried the example code supplied with the package methyAnalysis and am getting an error: > >> ################################################### >> ### code chunk number 3: Slide-window smoothing of the DNA methylation data >> ################################################### >> methyGenoSet.sm <- smoothMethyData(exampleMethyGenoSet, winSize = 250) > Smoothing Chromosome 21 ... > > Note: Method with signature ?GenoSet#character#ANY#ANY? chosen for function ?[?, > target signature ?MethyGenoSet#character#character#missing?. > "MethyGenoSet#ANY#ANY#ANY" would also be valid > Warning message: > The ranges method on a GenoSet is depricated. Please use space(locData(x)) or seqnames(locData(x)) as appropriate for RangedData or GRanges. >> methyGenoset.sm > Error: object 'methyGenoset.sm' not found typo -- methyGenoSet.sm Martin >> sessionInfo() > R version 2.15.2 (2012-10-26) > Platform: x86_64-redhat-linux-gnu (64-bit) > > locale: > [1] LC_CTYPE=en_US.UTF-8 > [2] LC_NUMERIC=C > [3] LC_TIME=en_US.UTF-8 > [4] LC_COLLATE=en_US.UTF-8 > [5] LC_MONETARY=en_US.UTF-8 > [6] LC_MESSAGES=en_US.UTF-8 > [7] LC_PAPER=C > [8] LC_NAME=C > [9] LC_ADDRESS=C > [10] LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_US.UTF-8 > [12] LC_IDENTIFICATION=C > > attached base packages: > [1] grid stats graphics grDevices > [5] utils datasets methods base > > other attached packages: > [1] methyAnalysis_1.0.0 org.Hs.eg.db_2.8.0 > [3] RSQLite_0.11.2 DBI_0.2-5 > [5] AnnotationDbi_1.20.5 Biobase_2.18.0 > [7] IRanges_1.16.6 BiocGenerics_0.4.0 > > loaded via a namespace (and not attached): > [1] affy_1.36.1 affyio_1.26.0 > [3] annotate_1.36.0 BiocInstaller_1.8.3 > [5] biomaRt_2.14.0 Biostrings_2.26.3 > [7] biovizBase_1.6.2 bitops_1.0-5 > [9] BSgenome_1.26.1 cluster_1.14.3 > [11] colorspace_1.2-1 dichromat_2.0-0 > [13] genefilter_1.40.0 GenomicFeatures_1.10.2 > [15] GenomicRanges_1.10.7 genoset_1.10.1 > [17] Gviz_1.2.1 Hmisc_3.10-1 > [19] KernSmooth_2.23-9 labeling_0.1 > [21] lattice_0.20-13 lumi_2.10.0 > [23] MASS_7.3-23 Matrix_1.0-11 > [25] methylumi_2.4.0 mgcv_1.7-22 > [27] munsell_0.4 nleqslv_2.0 > [29] nlme_3.1-108 parallel_2.15.2 > [31] plyr_1.8 preprocessCore_1.20.0 > [33] RColorBrewer_1.0-5 RCurl_1.95-4.1 > [35] Rsamtools_1.10.2 rtracklayer_1.18.2 > [37] scales_0.2.3 splines_2.15.2 > [39] stats4_2.15.2 stringr_0.6.2 > [41] survival_2.37-4 tools_2.15.2 > [43] XML_3.95-0.2 xtable_1.7-1 > [45] zlibbioc_1.4.0 >> > > With regards, > > Lavinia Gordon > Senior Research Officer > Quantitative Sciences Core, Bioinformatics > > Murdoch Childrens Research Institute > The Royal Children's Hospital > Flemington Road Parkville Victoria 3052 Australia > T 03 8341 6221 > www.mcri.edu.au<http: www.mcri.edu.au=""/> > > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > [[alternative HTML version deleted]] > > > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor > -- Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793
ADD COMMENTlink written 4.7 years ago by Martin Morgan ♦♦ 20k
Argh!, thanks Martin, sorry about that. So in that case I think I've worked out a (rather ugly) way to force minfi data into a MethyGenoSet object for use within the package methyAnalysis: Library(minfi) # mset is minfi object, e.g. used in dmpFinder code myexprs <- getM(mSet) mymeth <- getMeth(mSet) myunmeth <- getUnmeth(mSet) # using Tim Triches helpful code, thanks! library(IlluminaHumanMethylation450kprobe) data(IlluminaHumanMethylation450kprobe) library(GenomicRanges) chs = levels(IlluminaHumanMethylation450kprobe$chr) names(chs) = paste('chr',chs,sep='') CpGs.450k = with(IlluminaHumanMethylation450kprobe, GRanges(paste('chr',chr,sep=''), IRanges(start=site, width=2, names=Probe_ID), strand=strand)) CpGs.450k.df <- as.data.frame(CpGs.450k) mylocData <- RangedData(ranges=IRanges(start=CpGs.450k.df$start, end=CpGs.450k.df$end, names=row.names(CpGs.450k.df)), space=CpGs.450k.df$seqnames) mymethy.obj <- new("MethyGenoSet", locData=mylocData, assayData=assayDataNew(exprs=new("matrix"), methylated=new("matrix"), unmethylated=new("matrix"), detection=new("matrix"))) # make sure the CpG ids in mylocData agree with what is in CpGs.450k.df exprs(mymethy.obj) <- myexprs methylated(mymethy.obj) <- mymeth unmethylated(mymethy.obj) <- myunmeth # had to add this afterwards methyGenoSet.sm <- smoothMethyData(mymethy.obj, winSize = 250) I haven't run through all of the MethyAnalysis functions so the MethyGenoSet object may need more information added to it, in other slots, for it to work properly. Lavinia Gordon Senior Research Officer Quantitative Sciences Core, Bioinformatics Murdoch Childrens Research Institute The Royal Children's Hospital Flemington Road Parkville Victoria 3052 Australia T 03 8341 6221 www.mcri.edu.au -----Original Message----- From: Martin Morgan [mailto:mtmorgan@fhcrc.org] Sent: Saturday, 9 March 2013 1:49 AM To: Lavinia Gordon Cc: bioconductor at r-project.org; dupan at gmal.com Subject: Re: [BioC] methyAnalysis - changes to GenoSet On 03/07/2013 08:23 PM, Lavinia Gordon wrote: > Dear Bioc users, > I have just tried the example code supplied with the package methyAnalysis and am getting an error: > >> ################################################### >> ### code chunk number 3: Slide-window smoothing of the DNA >> methylation data ################################################### >> methyGenoSet.sm <- smoothMethyData(exampleMethyGenoSet, winSize = >> 250) > Smoothing Chromosome 21 ... > > Note: Method with signature ?GenoSet#character#ANY#ANY? chosen for > function ?[?, target signature ?MethyGenoSet#character#character#missing?. > "MethyGenoSet#ANY#ANY#ANY" would also be valid Warning message: > The ranges method on a GenoSet is depricated. Please use space(locData(x)) or seqnames(locData(x)) as appropriate for RangedData or GRanges. >> methyGenoset.sm > Error: object 'methyGenoset.sm' not found typo -- methyGenoSet.sm Martin >> sessionInfo() > R version 2.15.2 (2012-10-26) > Platform: x86_64-redhat-linux-gnu (64-bit) > > locale: > [1] LC_CTYPE=en_US.UTF-8 > [2] LC_NUMERIC=C > [3] LC_TIME=en_US.UTF-8 > [4] LC_COLLATE=en_US.UTF-8 > [5] LC_MONETARY=en_US.UTF-8 > [6] LC_MESSAGES=en_US.UTF-8 > [7] LC_PAPER=C > [8] LC_NAME=C > [9] LC_ADDRESS=C > [10] LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_US.UTF-8 > [12] LC_IDENTIFICATION=C > > attached base packages: > [1] grid stats graphics grDevices > [5] utils datasets methods base > > other attached packages: > [1] methyAnalysis_1.0.0 org.Hs.eg.db_2.8.0 > [3] RSQLite_0.11.2 DBI_0.2-5 > [5] AnnotationDbi_1.20.5 Biobase_2.18.0 > [7] IRanges_1.16.6 BiocGenerics_0.4.0 > > loaded via a namespace (and not attached): > [1] affy_1.36.1 affyio_1.26.0 > [3] annotate_1.36.0 BiocInstaller_1.8.3 > [5] biomaRt_2.14.0 Biostrings_2.26.3 > [7] biovizBase_1.6.2 bitops_1.0-5 > [9] BSgenome_1.26.1 cluster_1.14.3 > [11] colorspace_1.2-1 dichromat_2.0-0 > [13] genefilter_1.40.0 GenomicFeatures_1.10.2 > [15] GenomicRanges_1.10.7 genoset_1.10.1 > [17] Gviz_1.2.1 Hmisc_3.10-1 > [19] KernSmooth_2.23-9 labeling_0.1 > [21] lattice_0.20-13 lumi_2.10.0 > [23] MASS_7.3-23 Matrix_1.0-11 > [25] methylumi_2.4.0 mgcv_1.7-22 > [27] munsell_0.4 nleqslv_2.0 > [29] nlme_3.1-108 parallel_2.15.2 > [31] plyr_1.8 preprocessCore_1.20.0 > [33] RColorBrewer_1.0-5 RCurl_1.95-4.1 > [35] Rsamtools_1.10.2 rtracklayer_1.18.2 > [37] scales_0.2.3 splines_2.15.2 > [39] stats4_2.15.2 stringr_0.6.2 > [41] survival_2.37-4 tools_2.15.2 > [43] XML_3.95-0.2 xtable_1.7-1 > [45] zlibbioc_1.4.0 >> > > With regards, > > Lavinia Gordon > Senior Research Officer > Quantitative Sciences Core, Bioinformatics > > Murdoch Childrens Research Institute > The Royal Children's Hospital > Flemington Road Parkville Victoria 3052 Australia T 03 8341 6221 > www.mcri.edu.au<http: www.mcri.edu.au=""/> > > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > [[alternative HTML version deleted]] > > > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > -- Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793 ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com If you have any question, please contact MCRI IT Helpdesk for further assistance. ______________________________________________________________________ ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com
ADD REPLYlink written 4.7 years ago by Lavinia Gordon480
Lavina, I don't really have time to really look into all of this, but note the function mapToGenome which associates a MethylSet with genomic coordinates. So you can do gmSet = mapToGenome(mSet) and now you have granges(gmSet) # locations getMeth(gmSet) # methylation channel etc. Note that the transformation is non-invertible because a few CpGs have no associated genomic locations and they are dropped (well, you can use drop=FALSE). Kasper On Mon, Mar 11, 2013 at 5:13 PM, Lavinia Gordon <lavinia.gordon at="" mcri.edu.au=""> wrote: > Argh!, thanks Martin, sorry about that. > > So in that case I think I've worked out a (rather ugly) way to force minfi data into a MethyGenoSet object for use within the package methyAnalysis: > > Library(minfi) > # mset is minfi object, e.g. used in dmpFinder code > myexprs <- getM(mSet) > mymeth <- getMeth(mSet) > myunmeth <- getUnmeth(mSet) > > # using Tim Triches helpful code, thanks! > library(IlluminaHumanMethylation450kprobe) > data(IlluminaHumanMethylation450kprobe) > library(GenomicRanges) > chs = levels(IlluminaHumanMethylation450kprobe$chr) > names(chs) = paste('chr',chs,sep='') > CpGs.450k = with(IlluminaHumanMethylation450kprobe, > GRanges(paste('chr',chr,sep=''), > IRanges(start=site, width=2, names=Probe_ID), > strand=strand)) > > CpGs.450k.df <- as.data.frame(CpGs.450k) > > mylocData <- RangedData(ranges=IRanges(start=CpGs.450k.df$start, end=CpGs.450k.df$end, names=row.names(CpGs.450k.df)), space=CpGs.450k.df$seqnames) > > mymethy.obj <- new("MethyGenoSet", locData=mylocData, assayData=assayDataNew(exprs=new("matrix"), methylated=new("matrix"), unmethylated=new("matrix"), detection=new("matrix"))) > > # make sure the CpG ids in mylocData agree with what is in CpGs.450k.df > > exprs(mymethy.obj) <- myexprs > methylated(mymethy.obj) <- mymeth > unmethylated(mymethy.obj) <- myunmeth > # had to add this afterwards > > methyGenoSet.sm <- smoothMethyData(mymethy.obj, winSize = 250) > > I haven't run through all of the MethyAnalysis functions so the MethyGenoSet object may need more information added to it, in other slots, for it to work properly. > > > Lavinia Gordon > Senior Research Officer > Quantitative Sciences Core, Bioinformatics > > Murdoch Childrens Research Institute > The Royal Children's Hospital > Flemington Road Parkville Victoria 3052 Australia > T 03 8341 6221 > www.mcri.edu.au > > > -----Original Message----- > From: Martin Morgan [mailto:mtmorgan at fhcrc.org] > Sent: Saturday, 9 March 2013 1:49 AM > To: Lavinia Gordon > Cc: bioconductor at r-project.org; dupan at gmal.com > Subject: Re: [BioC] methyAnalysis - changes to GenoSet > > On 03/07/2013 08:23 PM, Lavinia Gordon wrote: >> Dear Bioc users, >> I have just tried the example code supplied with the package methyAnalysis and am getting an error: >> >>> ################################################### >>> ### code chunk number 3: Slide-window smoothing of the DNA >>> methylation data ################################################### >>> methyGenoSet.sm <- smoothMethyData(exampleMethyGenoSet, winSize = >>> 250) >> Smoothing Chromosome 21 ... >> >> Note: Method with signature ?GenoSet#character#ANY#ANY? chosen for >> function ?[?, target signature ?MethyGenoSet#character#character#missing?. >> "MethyGenoSet#ANY#ANY#ANY" would also be valid Warning message: >> The ranges method on a GenoSet is depricated. Please use space(locData(x)) or seqnames(locData(x)) as appropriate for RangedData or GRanges. >>> methyGenoset.sm >> Error: object 'methyGenoset.sm' not found > > typo -- methyGenoSet.sm > > Martin > >>> sessionInfo() >> R version 2.15.2 (2012-10-26) >> Platform: x86_64-redhat-linux-gnu (64-bit) >> >> locale: >> [1] LC_CTYPE=en_US.UTF-8 >> [2] LC_NUMERIC=C >> [3] LC_TIME=en_US.UTF-8 >> [4] LC_COLLATE=en_US.UTF-8 >> [5] LC_MONETARY=en_US.UTF-8 >> [6] LC_MESSAGES=en_US.UTF-8 >> [7] LC_PAPER=C >> [8] LC_NAME=C >> [9] LC_ADDRESS=C >> [10] LC_TELEPHONE=C >> [11] LC_MEASUREMENT=en_US.UTF-8 >> [12] LC_IDENTIFICATION=C >> >> attached base packages: >> [1] grid stats graphics grDevices >> [5] utils datasets methods base >> >> other attached packages: >> [1] methyAnalysis_1.0.0 org.Hs.eg.db_2.8.0 >> [3] RSQLite_0.11.2 DBI_0.2-5 >> [5] AnnotationDbi_1.20.5 Biobase_2.18.0 >> [7] IRanges_1.16.6 BiocGenerics_0.4.0 >> >> loaded via a namespace (and not attached): >> [1] affy_1.36.1 affyio_1.26.0 >> [3] annotate_1.36.0 BiocInstaller_1.8.3 >> [5] biomaRt_2.14.0 Biostrings_2.26.3 >> [7] biovizBase_1.6.2 bitops_1.0-5 >> [9] BSgenome_1.26.1 cluster_1.14.3 >> [11] colorspace_1.2-1 dichromat_2.0-0 >> [13] genefilter_1.40.0 GenomicFeatures_1.10.2 >> [15] GenomicRanges_1.10.7 genoset_1.10.1 >> [17] Gviz_1.2.1 Hmisc_3.10-1 >> [19] KernSmooth_2.23-9 labeling_0.1 >> [21] lattice_0.20-13 lumi_2.10.0 >> [23] MASS_7.3-23 Matrix_1.0-11 >> [25] methylumi_2.4.0 mgcv_1.7-22 >> [27] munsell_0.4 nleqslv_2.0 >> [29] nlme_3.1-108 parallel_2.15.2 >> [31] plyr_1.8 preprocessCore_1.20.0 >> [33] RColorBrewer_1.0-5 RCurl_1.95-4.1 >> [35] Rsamtools_1.10.2 rtracklayer_1.18.2 >> [37] scales_0.2.3 splines_2.15.2 >> [39] stats4_2.15.2 stringr_0.6.2 >> [41] survival_2.37-4 tools_2.15.2 >> [43] XML_3.95-0.2 xtable_1.7-1 >> [45] zlibbioc_1.4.0 >>> >> >> With regards, >> >> Lavinia Gordon >> Senior Research Officer >> Quantitative Sciences Core, Bioinformatics >> >> Murdoch Childrens Research Institute >> The Royal Children's Hospital >> Flemington Road Parkville Victoria 3052 Australia T 03 8341 6221 >> www.mcri.edu.au<http: www.mcri.edu.au=""/> >> >> >> ______________________________________________________________________ >> This email has been scanned by the Symantec Email Security.cloud service. >> For more information please visit http://www.symanteccloud.com >> ______________________________________________________________________ >> [[alternative HTML version deleted]] >> >> >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at r-project.org >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: >> http://news.gmane.org/gmane.science.biology.informatics.conductor >> > > > -- > Computational Biology / Fred Hutchinson Cancer Research Center > 1100 Fairview Ave. N. > PO Box 19024 Seattle, WA 98109 > > Location: Arnold Building M1 B861 > Phone: (206) 667-2793 > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > > If you have any question, please contact MCRI IT Helpdesk for further assistance. > ______________________________________________________________________ > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD REPLYlink written 4.7 years ago by Kasper Daniel Hansen6.3k
Right, my original intent was simply to coerce the SummarizedExperiment-based containers from methylumi and minfi into a genoset for Pan's package. That reminds me, I need to update the documentation for 450kProbe to note that it is essentially obsolete, since both methylumi and minfi can emit SummarizedExperiments. The only mop-up now is for me to send in a few minfi patches for processing. The innards of minfi are tidier than... Others. --t On Mar 12, 2013, at 6:57 AM, Kasper Daniel Hansen <kasperdanielhansen at="" gmail.com=""> wrote: > Lavina, > > I don't really have time to really look into all of this, but note the > function mapToGenome which associates a MethylSet with genomic > coordinates. So you can do > > gmSet = mapToGenome(mSet) > > and now you have > > granges(gmSet) # locations > getMeth(gmSet) # methylation channel > > etc. Note that the transformation is non-invertible because a few > CpGs have no associated genomic locations and they are dropped (well, > you can use drop=FALSE). > > Kasper > > On Mon, Mar 11, 2013 at 5:13 PM, Lavinia Gordon > <lavinia.gordon at="" mcri.edu.au=""> wrote: >> Argh!, thanks Martin, sorry about that. >> >> So in that case I think I've worked out a (rather ugly) way to force minfi data into a MethyGenoSet object for use within the package methyAnalysis: >> >> Library(minfi) >> # mset is minfi object, e.g. used in dmpFinder code >> myexprs <- getM(mSet) >> mymeth <- getMeth(mSet) >> myunmeth <- getUnmeth(mSet) >> >> # using Tim Triches helpful code, thanks! >> library(IlluminaHumanMethylation450kprobe) >> data(IlluminaHumanMethylation450kprobe) >> library(GenomicRanges) >> chs = levels(IlluminaHumanMethylation450kprobe$chr) >> names(chs) = paste('chr',chs,sep='') >> CpGs.450k = with(IlluminaHumanMethylation450kprobe, >> GRanges(paste('chr',chr,sep=''), >> IRanges(start=site, width=2, names=Probe_ID), >> strand=strand)) >> >> CpGs.450k.df <- as.data.frame(CpGs.450k) >> >> mylocData <- RangedData(ranges=IRanges(start=CpGs.450k.df$start, end=CpGs.450k.df$end, names=row.names(CpGs.450k.df)), space=CpGs.450k.df$seqnames) >> >> mymethy.obj <- new("MethyGenoSet", locData=mylocData, assayData=assayDataNew(exprs=new("matrix"), methylated=new("matrix"), unmethylated=new("matrix"), detection=new("matrix"))) >> >> # make sure the CpG ids in mylocData agree with what is in CpGs.450k.df >> >> exprs(mymethy.obj) <- myexprs >> methylated(mymethy.obj) <- mymeth >> unmethylated(mymethy.obj) <- myunmeth >> # had to add this afterwards >> >> methyGenoSet.sm <- smoothMethyData(mymethy.obj, winSize = 250) >> >> I haven't run through all of the MethyAnalysis functions so the MethyGenoSet object may need more information added to it, in other slots, for it to work properly. >> >> >> Lavinia Gordon >> Senior Research Officer >> Quantitative Sciences Core, Bioinformatics >> >> Murdoch Childrens Research Institute >> The Royal Children's Hospital >> Flemington Road Parkville Victoria 3052 Australia >> T 03 8341 6221 >> www.mcri.edu.au >> >> >> -----Original Message----- >> From: Martin Morgan [mailto:mtmorgan at fhcrc.org] >> Sent: Saturday, 9 March 2013 1:49 AM >> To: Lavinia Gordon >> Cc: bioconductor at r-project.org; dupan at gmal.com >> Subject: Re: [BioC] methyAnalysis - changes to GenoSet >> >> On 03/07/2013 08:23 PM, Lavinia Gordon wrote: >>> Dear Bioc users, >>> I have just tried the example code supplied with the package methyAnalysis and am getting an error: >>> >>>> ################################################### >>>> ### code chunk number 3: Slide-window smoothing of the DNA >>>> methylation data ################################################### >>>> methyGenoSet.sm <- smoothMethyData(exampleMethyGenoSet, winSize = >>>> 250) >>> Smoothing Chromosome 21 ... >>> >>> Note: Method with signature ?GenoSet#character#ANY#ANY? chosen for >>> function ?[?, target signature ?MethyGenoSet#character#character#missing?. >>> "MethyGenoSet#ANY#ANY#ANY" would also be valid Warning message: >>> The ranges method on a GenoSet is depricated. Please use space(locData(x)) or seqnames(locData(x)) as appropriate for RangedData or GRanges. >>>> methyGenoset.sm >>> Error: object 'methyGenoset.sm' not found >> >> typo -- methyGenoSet.sm >> >> Martin >> >>>> sessionInfo() >>> R version 2.15.2 (2012-10-26) >>> Platform: x86_64-redhat-linux-gnu (64-bit) >>> >>> locale: >>> [1] LC_CTYPE=en_US.UTF-8 >>> [2] LC_NUMERIC=C >>> [3] LC_TIME=en_US.UTF-8 >>> [4] LC_COLLATE=en_US.UTF-8 >>> [5] LC_MONETARY=en_US.UTF-8 >>> [6] LC_MESSAGES=en_US.UTF-8 >>> [7] LC_PAPER=C >>> [8] LC_NAME=C >>> [9] LC_ADDRESS=C >>> [10] LC_TELEPHONE=C >>> [11] LC_MEASUREMENT=en_US.UTF-8 >>> [12] LC_IDENTIFICATION=C >>> >>> attached base packages: >>> [1] grid stats graphics grDevices >>> [5] utils datasets methods base >>> >>> other attached packages: >>> [1] methyAnalysis_1.0.0 org.Hs.eg.db_2.8.0 >>> [3] RSQLite_0.11.2 DBI_0.2-5 >>> [5] AnnotationDbi_1.20.5 Biobase_2.18.0 >>> [7] IRanges_1.16.6 BiocGenerics_0.4.0 >>> >>> loaded via a namespace (and not attached): >>> [1] affy_1.36.1 affyio_1.26.0 >>> [3] annotate_1.36.0 BiocInstaller_1.8.3 >>> [5] biomaRt_2.14.0 Biostrings_2.26.3 >>> [7] biovizBase_1.6.2 bitops_1.0-5 >>> [9] BSgenome_1.26.1 cluster_1.14.3 >>> [11] colorspace_1.2-1 dichromat_2.0-0 >>> [13] genefilter_1.40.0 GenomicFeatures_1.10.2 >>> [15] GenomicRanges_1.10.7 genoset_1.10.1 >>> [17] Gviz_1.2.1 Hmisc_3.10-1 >>> [19] KernSmooth_2.23-9 labeling_0.1 >>> [21] lattice_0.20-13 lumi_2.10.0 >>> [23] MASS_7.3-23 Matrix_1.0-11 >>> [25] methylumi_2.4.0 mgcv_1.7-22 >>> [27] munsell_0.4 nleqslv_2.0 >>> [29] nlme_3.1-108 parallel_2.15.2 >>> [31] plyr_1.8 preprocessCore_1.20.0 >>> [33] RColorBrewer_1.0-5 RCurl_1.95-4.1 >>> [35] Rsamtools_1.10.2 rtracklayer_1.18.2 >>> [37] scales_0.2.3 splines_2.15.2 >>> [39] stats4_2.15.2 stringr_0.6.2 >>> [41] survival_2.37-4 tools_2.15.2 >>> [43] XML_3.95-0.2 xtable_1.7-1 >>> [45] zlibbioc_1.4.0 >>> >>> With regards, >>> >>> Lavinia Gordon >>> Senior Research Officer >>> Quantitative Sciences Core, Bioinformatics >>> >>> Murdoch Childrens Research Institute >>> The Royal Children's Hospital >>> Flemington Road Parkville Victoria 3052 Australia T 03 8341 6221 >>> www.mcri.edu.au<http: www.mcri.edu.au=""/> >>> >>> >>> ______________________________________________________________________ >>> This email has been scanned by the Symantec Email Security.cloud service. >>> For more information please visit http://www.symanteccloud.com >>> ______________________________________________________________________ >>> [[alternative HTML version deleted]] >>> >>> >>> >>> _______________________________________________ >>> Bioconductor mailing list >>> Bioconductor at r-project.org >>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>> Search the archives: >>> http://news.gmane.org/gmane.science.biology.informatics.conductor >> >> >> -- >> Computational Biology / Fred Hutchinson Cancer Research Center >> 1100 Fairview Ave. N. >> PO Box 19024 Seattle, WA 98109 >> >> Location: Arnold Building M1 B861 >> Phone: (206) 667-2793 >> >> ______________________________________________________________________ >> This email has been scanned by the Symantec Email Security.cloud service. >> For more information please visit http://www.symanteccloud.com >> >> If you have any question, please contact MCRI IT Helpdesk for further assistance. >> ______________________________________________________________________ >> >> ______________________________________________________________________ >> This email has been scanned by the Symantec Email Security.cloud service. >> For more information please visit http://www.symanteccloud.com >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at r-project.org >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD REPLYlink written 4.7 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 2.2.0
Traffic: 132 users visited in the last hour