LieberInstitute / jaffelab

R package with commonly used functions by the Jaffe lab
http://lieberinstitute.github.io/jaffelab
7 stars 3 forks source link

A question about `cleaningY` #6

Closed QianhuiWan closed 3 years ago

QianhuiWan commented 3 years ago

Hello, I have a question about cleaningY function. Is cleaningY function also suitable for removing surrogate variables from DNA methylation array data? I have data from illumina 850K array platform, and I used normalised M value matrix (Mnorm) as input data. My code is shown as follows:

library(jaffelab)

# model matrix with 5 surrogate variables estimated from comtrol probes
mod <- with(phenoData, model.matrix(~ PC1+PC2+PC3+PC4+PC5))

# regress out 5 surrogate variables from my M value matrix
cleanMnorm <-  cleaningY(y = Mnorm, mod = mod, P = 1)

Thank you so much.

Best regards

Qianhui

andrewejaffe commented 3 years ago

Yes, we do that all the time. Note you can transform back the clean data to the beta scale. You can also apply to the beta scale directly but this won't ensure resulting cleaned methylation values are between 0 and 1

On Sun, Apr 11, 2021, 4:47 AM Qianhui @.***> wrote:

Hello, I have a question about cleaningY function. Is cleaningY function also suitable for removing surrogate variables from DNA methylation array data? I have data from illumina 850K array platform, and I used normalised M value matrix (Mnorm) as input data. My code is shown as follows:

library(jaffelab)

model matrix with 5 surrogate variables estimated from comtrol probes

mod <- with(phenoData, model.matrix(~ PC1+PC2+PC3+PC4+PC5))

regress out 5 surrogate variables from my M value matrix

cleanMnorm <- cleaningY(y = Mnorm, mod = mod, P = 1)

Thank you so much.

Best regards

Qianhui

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/LieberInstitute/jaffelab/issues/6, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEYY2B4BKX5IB62JBST5F3TIFOYRANCNFSM42XNTMFQ .

QianhuiWan commented 3 years ago

Thank you so much for your prompt reply to my question, the information was very helpful to me!