Added plotting to GWAS utilities#28
Conversation
|
Quick followups to this that I would like to do:
Not planning on doing (at least within this pull request):
|
refactoring of python caller functions output_sig_snps_only flag to keep only significant snps in csv
remove need to constantly delete empty output file on failed analysis. a "fail fast" check is done before analysis.
pool sizes was not being normalized which was breaking min_allele_frequency. by fixing it, it now works as intended and remove_monoallelic is somewhat unnecessary so removed.
scripts previously wrongly assumed there could only be 1 phenotype. now outputs a plot for each phenotype. at the same time, made kinship and non-kinship adjusted gwas labels consistent.
|
So i added 2 more commits. The first commit fixes It isn't completely relevant to the pull request, but i didn't want to deal with merge conflicts down the road if i started from main branch. And it just fixes a bug. The second commit fixes what I forgot to account for - that GWAS tools may be run with multiple traits. So that just makes sure all the right plots are generated, the significance threshold is computed correctly, etc. As a side note: Why were |
I'm not 100% certain. I have to really refresh my memory and dig into the architecture again but my intuition says it has something to do with having to both genotype and phenotype data as input for GWAS/GP as opposed to only genotype input for the population genetics stuff. |
That's great thanks for fixing that! |
Added plotting using python scripts to GWAS utilities (
ols_iter,ols_iter_with_kinship,mle_iter,mle_iter_with_kinship) to automatically generate manhattan and qq plots. Manhattan plots have a Bonferroni corrected significance threshold and are color labeled by chromosome. QQ plots checks the uniformity of p-values.Python scripts integrate well with poolgen (no path issues, saved plots are added to output string only if script is successful, etc.).
Example figures:


Also includes a previous commit that refactors the argument parsing system to be much simpler by levereging
value_parserfromclap. No functional changes from that commit.