precimed / mostest

Multivariate Omnibus Statistical Test
GNU General Public License v3.0
20 stars 2 forks source link

How to determine which phenotype the SNPS found by MOST belong to? #12

Open ThisHq opened 2 years ago

denvdm commented 2 years ago

Hi, I suggest you simply take a look at the univariate GWAS results

ThisHq commented 2 years ago

Hi, I suggest you simply take a look at the univariate GWAS results

thanks,I also want to ask what to do with covariate files, I don't see covariate files as input for Mostest

denvdm commented 2 years ago

The outcome measures should be pre-residualized, please see the 'other considerations' section in the readme.

ThisHq commented 2 years ago

The outcome measures should be pre-residualized, please see the 'other considerations' section in the readme.

Thanks,I saw the notes on pre-residualized, and I would like to ask whether the code for pre-residualized is resid.m? I saw in the notes that R is used to accomplish this, and I don't know which method can accomplish pre-residualized. Thank you for your answer.

denvdm commented 2 years ago

No method included, this is indeed done in R with straightforward linear regression, as exemplified in the 'other considerations' section. In other words, you'll need to adapt this code yourself to your specific data/covariates, before running MOSTest:

for(f in outcomes){ tmplm <- summary(lm(get(f) ~ Age + Sex + Scanner + OtherCovars, data=df)) df[,which(colnames(df)==f)] <- tmplm$residuals }

hope this helps

ThisHq commented 2 years ago

No method included, this is indeed done in R with straightforward linear regression, as exemplified in the 'other considerations' section. In other words, you'll need to adapt this code yourself to your specific data/covariates, before running MOSTest:

for(f in outcomes){ tmplm <- summary(lm(get(f) ~ Age + Sex + Scanner + OtherCovars, data=df)) df[,which(colnames(df)==f)] <- tmplm$residuals }

hope this helps Thanks,I tried to implement it using R, which generates a list of residuals. I don't know if I got this right, “f” is the phenotype and “df” is the covariate. But I don't quite understand "df[,which(colnames(df)==f)]". "which (colnames(df)==f)" stands for finding the same columns in phenotypes and covariates, what do these columns refer to? FID, IID? Is it correct that I replace the original phenotype with the generated list of residuals and input it into Mostest as the new phenotype? Sorry to bother you again.