GreenwoodLab / funtooNorm

6 stars 7 forks source link

Inverted beta-values from getNormBeta() #12

Closed nickfishbane closed 5 years ago

nickfishbane commented 8 years ago

I recently used funtooNorm to normalize raw 450K .idat files through the pipeline described in the vignette. Eventually I noticed the relationship between M-values and beta-values (as extracted using getNormBeta and getNormM from the sample normalized sampleSet) have an inverse relationship! i.e. low M-values correspond to high beta-values and vice versa.

I think perhaps the problem is that the function getNormBeta() uses a helper function, calcBeta(), which is defined as such:

calcBeta <- function (A, B, offset = 100) 
{
    return((2^B - 1)/(2^A + 2^B - 2 + offset))
}

Is that the unmethylated signal in the numerator? Isn't the beta-value supposed to have the methylated signal in the numerator? At least according to Du et al 2010?

I think A and B are not inverted in the use of this function since the calls for the two high-level functions are:

From getNormM:

getLogSigA(object$predmat) - getLogSigB(object$predmat)

From getNormBeta:

calcBeta(getLogSigA(object$predmat), getLogSigB(object$predmat), 
        offset)
kkleinoros commented 8 years ago

The Beta values are correct the M-values were inverted.

From: Raphael Poujol [mailto:notifications@github.com] Sent: May-30-16 7:05 PM To: GreenwoodLab/funtooNorm Subject: Re: [GreenwoodLab/funtooNorm] Inverted beta-values from getNormBeta() (#12)

It seem that you re perfectly right. This is a major mistake since the beta values are all wrong, thanks a lot !

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/GreenwoodLab/funtooNorm/issues/12#issuecomment-222563970, or mute the threadhttps://github.com/notifications/unsubscribe/AHmO-UgKDtxtggh_HgArbuca7z4EiDTVks5qG2z-gaJpZM4IjcYd.

kkleinoros commented 8 years ago

The Beta values are correct, It is the M-values that were inverted and this has been fixed.

RaphaelRaphael commented 8 years ago

Ok ! Thank you for that Kathleen, I was wondering how I could have miss that after my testings.