Skip to content

Conversation

@rounakdey
Copy link

  1. Implemented b.sna2 test for epacts-multi.
  2. The null object for the b.sna2 test will only be calculated once and saved as .RData file. During the GWAS/PheWAS, epactsSingle.R/epactsMulti.R will only load pheno, genos, and the previously saved null object. This eliminates the computation of the null object for each chunk of SNPs, and significantly reduces computation times where calculating the null object is time consuming (when sample size is very large, eg. UKBioBank data). Moreover, it facilitates using smaller chunk sizes which is memory efficient for data with large sample sizes.
  3. Implemented beta estimation for b.sna2 test. The beta parameters are estimated using Clement Ma's implementation of Firth's method, and therefore is a slow process. Beta parameters are only estimated when p < 5*10^-6.

Bypasses the error message for missing phenotypes and let epacts-multi handle the missing phenotype issue.
Runs epactsSingleNull.R to create the null object for SPA test before starting the GWAS, so that the null model is not needed to be calculated for every chunk (of size "unit", default 500K bp) of SNPs. After running epactsSingleNull.R, each instance of epactsSingle.R just loads the null object and performs the test. This helps to reduce the chunk size (memory efficient) and increase the number of chunks without requiring to calculate the null object for each chunk.
Includes SPA test (b.sna2).
Also includes codes to run epactsMultiNull.R once to calculate the null object and then use it directly in each run of epactsMulti.R.
For b.sna2 test, loads the path of the null object through covf argument
Includes SPA test, also includes codes to load the path of the null object through the covf argument
Loads null object created by epactsSingleNull.R
Performs beta estimation for p<5*10^-6
Detect where null model is not converging using glm, and apply Firth instead for those cases
Detect where null model is not converging using glm, and apply Firth instead for those cases
Detect where null model is not converging using glm, and apply Firth instead for those cases
Detect where null model is not converging using glm, and apply Firth instead for those cases
convflag <-1 instead of convflag==1
convflag <-1 instead of convflag==1
convflag <-1 instead of convflag==1
convflag <-1 instead of convflag==1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants