[BioC] methyAnalysis - changes to GenoSet

Lavinia Gordon lavinia.gordon at mcri.edu.au
Mon Mar 11 22:13:51 CET 2013


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



More information about the Bioconductor mailing list