-
Notifications
You must be signed in to change notification settings - Fork 21
SPA test for epacts-multi, beta estimation and optimized for large sample sizes #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rounakdey
wants to merge
18
commits into
statgen:master
Choose a base branch
from
rounakdey:updateSPA
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rounakdey
commented
Sep 18, 2017
- Implemented b.sna2 test for epacts-multi.
- 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.
- 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.