mz2 / peer

A factor analysis package
9 stars 41 forks source link

question about PEER_update #16

Open hust-yyan opened 2 years ago

hust-yyan commented 2 years ago

Hello, I encountered the following bug when running R-peer again image this is my code: library(peer) load("/data1/shiyan_data/plasma.miRNA.eqtl.RData") model = PEER() PEER_setPhenoMean(model,as.matrix(t(counts))) covs<-sampleinfo[,c("Sex","Age","BMI","Smoking","hypertension","hyperlipidemia","Diabetes")] covs<-apply(covs,2,as.numeric) rownames(covs)<-sampleinfo$ID PEER_setCovariates(model, as.matrix(covs)) PEER_setAdd_mean(model, TRUE) PEER_update(model)

lp2 commented 2 years ago

Hello,

thank you for the report. Ricard (cc-d) has folded PEER into the multi-omics factor analysis (MOFA) framework as described below - we recommend using this going forward, as it is properly supported, and it may resolve your issues.

Leo

From Ricard:

Running MOFA (https://github.com/bioFAM/MOFA2) with one view is effectively PEER. We have also added functionalities and visualisations to interpret the factors before regressing them out for eQTL mapping or any other downstream analysis.

I’ve built a wrapper here: https://github.com/bioFAM/PEER

Let me know if you have any questions. We have a Slack channel where I provide individualised help. The link is in the MOFA2 github.

We have not made the official release yet as we would like to get some feedback how this is working and how intuitive this is. Please let me know about your experience

Best, Ricard.

On Fri, Feb 18, 2022 at 12:59 PM hust-yyan @.***> wrote:

Hello, I encountered the following bug when running R-peer again [image: image] https://user-images.githubusercontent.com/54279739/154687130-c40201e1-5ddd-40f3-9a45-994e7fb4c63d.png this is my code: library(peer) load("/data1/shiyan_data/plasma.miRNA.eqtl.RData") model = PEER() PEER_setPhenoMean(model,as.matrix(t(counts)))

covs<-sampleinfo[,c("Sex","Age","BMI","Smoking","hypertension","hyperlipidemia","Diabetes")] covs<-apply(covs,2,as.numeric) rownames(covs)<-sampleinfo$ID PEER_setCovariates(model, as.matrix(covs)) PEER_setAdd_mean(model, TRUE) PEER_update(model)

— Reply to this email directly, view it on GitHub https://github.com/mz2/peer/issues/16, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADIQI2NR3WHFHU7SK62ICTU3Y7BHANCNFSM5OX2WAMA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

hust-yyan commented 2 years ago

Hello, I saw this link (https://github.com/bioFAM/PEER), I have a question, in the case of using MOFA2 to perform PEER analysis is not considering the influence of other known covariates?

lp2 commented 2 years ago

Ricard - how would you recommend using PEER in MOFA2 with covariates? Is there perhaps a vignette that could be adapted?

Leo

On Fri, Feb 18, 2022 at 1:42 PM hust-yyan @.***> wrote:

Hello, I saw this link (https://github.com/bioFAM/PEER), I have a question, in the case of using MOFA2 to perform PEER analysis is not considering the influence of other known covariates?

— Reply to this email directly, view it on GitHub https://github.com/mz2/peer/issues/16#issuecomment-1044544324, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADIQI5LNTTHX5OMA6I2OHLU3ZECVANCNFSM5OX2WAMA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

lp2 commented 2 years ago

[copying Ricard as well]

On Fri, Feb 18, 2022 at 1:43 PM Leopold Parts @.***> wrote:

Ricard - how would you recommend using PEER in MOFA2 with covariates? Is there perhaps a vignette that could be adapted?

Leo

On Fri, Feb 18, 2022 at 1:42 PM hust-yyan @.***> wrote:

Hello, I saw this link (https://github.com/bioFAM/PEER), I have a question, in the case of using MOFA2 to perform PEER analysis is not considering the influence of other known covariates?

— Reply to this email directly, view it on GitHub https://github.com/mz2/peer/issues/16#issuecomment-1044544324, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADIQI5LNTTHX5OMA6I2OHLU3ZECVANCNFSM5OX2WAMA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>