How to export with minfi quantile normalized preprocessed 850K methylation data?
Entering edit mode
3.5 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:

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 • 1.6k views
Entering edit mode
3.5 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")


Login before adding your answer.

Traffic: 1035 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6