Question: M Value from Non-Normalized Methylated and Unmethylated Signal 450k
0
christophersugai0 wrote:

Hi all,

I'm interested in getting an M value for each cpg from an Illumina 450k array, but the data was deposited in unmethylated and methylated signal in this GEO (https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE53840), is there a simple method to create the M values from this matrix, or would I have to manually input the equation into R and do sapply? In which case, it would be `log2((methylated +1)/(unmethylated+1))` from pan du et al. 2016? Thanks for helping a noob out!

``````ID_REF

SAMPLE1 Unmethylated Signal

SAMPLE1 Methylated Signal

cg00035864  4327    863
cg00050873  640 11173
cg00061679  981 2215
cg00063477  299 4303
cg00121626  3382    6491
cg00212031  3721    405
cg00213748  391 1558
cg00214611  4018    219
cg00223952  7333    584
cg00243321  5591    13
``````
methylation R 450k • 1.1k views
modified 10 months ago by rmf770 • written 21 months ago by christophersugai0
0
Kevin Blighe53k wrote:

Yes, when reading your question, that was also my interpretation, i.e., to follow the formulae in the Pan Du manuscript: Comparison of Beta-value and M-value methods for quantifying methylation levels by microarray analysis. Coding these in R should be quite easy:

# 1, β (beta) value # 2 M value ## ---------------------------------------

Best of luck

kevin

I saw this equation for the Beta in many places, but when I try to calculate it myself in a file where the Beta has already been calculated I don't get the same answer. I'm also not sure what the max is for (because I only have one signal score for each probe). For example: For a probe where Signal A is 9769 and Signal B is 515 I calculate 9769/(9769+515+100) I get 0.9407743. But in the file they have the Avg_Beta as 0.04960. The signals come from a file in GEO -- GSE38608_methylated_unmethylated_signals.txt.gz What am I doing wrong? Am I supposed to calculate this from a different file? Thanks in advance, Avital

0
rmf770 wrote:

This is the code that I use in R.

``````#' @title get_mv
#' @description Compute M values from beta values
#' @param B A beta value matrix where rows are probes and columns are samples
#' @return Returns an M value matrix
#'
get_mv <- function(B)
{
if(missing(B)) stop("Input is empty.")
return(log2((B+0.0001)/((1-B)+0.0001)))
}
``````