I’m not a scientist but I really want to understand how calculation of SNP effect size work.
I’ve seen visualisations of effect size on a various websites that provide analyzing of raw dna files from direct-to-customer dna testing companies and want to replicate it by my own.
Here is example from dna.land:
They describe that chart like that:
For each SNP, this effect is determined by how many effect alleles you possess (0, 1, or 2), the effect size of the SNP, and the frequency of the effect allele in your ancestry group. Each bar on the y-axis represents one SNP. The x-axis represents the effect of the SNP and can be interpreted as a distance in standard deviations from the mean trait score on a standard normal distribution.
I’ve tried to make the same chart by myself but looks like i am missing some knowledge about how to do it.
I picked the same SNPs as in example, found info about them in GWAS Catalog and added my genotype from raw dna file.
I put it in a table:
SNP My Genotype Effect Allele P-value RAF Beta CI rs490647 AG A 3 x 10-7 0.24648 0.029943 unit increase [0.018-0.041] rs4653663 AT A 2 x 10-8 0.255 0.091 unit increase [0.06-0.122] rs12637928 AT A 4 x 10-8 0.49 0.077 unit decrease [0.05-0.104] rs12682352 TT T 2 x 10-15 0.525 0.115 unit increase [0.088-0.142] rs12378446 CT T 9 x 10-9 0.791 0.1 unit increase [0.067-0.133]
At first i thought that for this visualisation I need only Beta coefficient and amount of risk alleles in my genotype, but looks like i need also take into account Risk Allele Frequency and ancestry group.
Can someone help me understand:
1) How to calculate effect size using Beta and Risk Allele Frequency
2) How to take into account my Ancestry group?
Thanks in advance!
I have one more question regarding image with effect sizes in first post/
How is it possible that I have both risk alleles but still don't have 100% of potential effect?
For example on rs12682352 my genotype is TT with risk allele T, but on image red part is going only on half to the right. How is it possible?
I thought you getting maximum effect size when you have both risk alleles but looks like it's not maximum.