How to export with minfi quantile normalized preprocessed 850K methylation data?
1
0
Entering edit mode
4.9 years ago
sbdejene • 0

Hello all,

I am trying to normalize my raw methylation beta-values using minfi with R version 3.6.0. I have been following the bioconductor user guide in order to do so:

https://www.bioconductor.org/help/course-materials/2015/BioC2015/methylation450k.html.

After running the preprocessQuantile function, I receive the following standard messages:

# [preprocessQuantile] Mapping to genome. 
# [preprocessQuantile] Fixing outliers. 
# [preprocessQuantile] Quantile normalizing.

As well as the following warning message:

# Warning message: 
# In .getSex(CN = CN, xIndex = xIndex, yIndex = yIndex, cutoff = cutoff) : An inconsistency was encountered while determining sex. One possibility is that only one sex is present. We recommend further checks, for example with the plotSex function.

I am not concerned about the warning message because I do expect for all my samples to be female.

My issue is with exporting the preprocessQuantile normalized beta values from R. The Bioconductor Minfi User Guide states that: "Note: The function returns a GenomicRatioSet object ready for downstream analysis."

I tried using write.table function to do so and received this error:

# Error in as.vector(x) : no method for coercing this S4 class to a vector.

Is it not possible to export files into .txt format?

For reference also, this is the write.table function that I had used:

write.table(GRset_ascites.quantile, "H:/Cyto/PCPGM/IDAT/Cytoquantilenorm.txt", sep="\t")

I am admittedly inexperienced with R, but still learning! I'm also a long-time-lurker on Biostars, but this is my first time posting so please critique my question as needed. :)

R methylation minfi quantile normalization • 2.1k views
ADD COMMENT
0
Entering edit mode
4.9 years ago
sbdejene • 0

Hi everyone,

Thought I would post what ended up working for me, hopefully it can be helpful to someone in the future!

Again, I was following: "Analysis of 450k data using minfi" User Guide by Jean-Philippe Fortin and Kasper Daniel Hansen

I was zeroed in on following the steps for preprocessQuantile normalization (Section 5.4) and was trying to use write.table function on the output: GenomicRatioSet object.

First I needed to: getBeta(GRset.quantile) # function is first mentioned in Sections 3.1 & 3.2

And then use: write.table(beta, file = "H:/Cyto/PCPGM/IDAT/CytoQuantileNorm.txt", sep = "\t")

ADD COMMENT

Login before adding your answer.

Traffic: 1480 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