Allele frequency comparison by Fisher's exact test
1
0
Entering edit mode
6.1 years ago
seta ★ 1.9k

Dear friends,

I would like to compare the allele frequency of a list containing 3000 SNPs related to a given trait between my population and 1000 genome populations (super populations). For my population, the SNPs derived from whole genome sequencing of about 1000 individuals. But, due to missing genotypes and some quality control done at previous steps, the number of individuals (so the total allele counts) is not the same at all SNP positions, however as I checked, it (the total allele count) is the same at all positions for 1000 genome population. As I read, the fisher’s exact test can be used to compare allele count among the population for finding SNPs with significantly different allele frequency, yes? I also aware of the simple Fisher's test for one SNP in R, but I don’t know how I can do it for a list of 3000 SNPs and get the adjusted p-value for each SNP. Could you please help me out on this issue?

P.S. As I’m a basically biologist, please kindly suggest/advise me any point that should be considered for doing the analysis.

Many thanks

allele frequency population Fisher's exact test • 6.2k views
ADD COMMENT
1
Entering edit mode
6.1 years ago
egeulgen ★ 1.3k

You may perform multiple Fisher's exact test, store the p values and then adjust them. In R, you would do something along the lines of:

### Perform Fisher's exact and store the p-values
p_vals <- c()
for (i in 1:N_SNPS) {
    result <-  fisher.test(...)
    p_vals <- c(p_vals, result$p.value)
}
### Adjust the p p-values
p_adjusted <- p.adjust(p_vals, method = "YOUR_FAVORITE_METHOD")

Hope this helps

ADD COMMENT
0
Entering edit mode

Thank you for the response. Could you please kindly tell me how I should run multiple, here 3000, Fisher's exact test and store the related p-value for each SNP?

ADD REPLY
0
Entering edit mode

I provided the example R code in my response (see above). There N_SNP is replaced with 3000 and for fisher.test you have to do something like:

fisher.test(table(my_genotypes[i, ], 1kg_genotypes[i, ]))

This does depend on how you store the two.

ADD REPLY
0
Entering edit mode

Thanks for your help. I have both, the ref and alt allele count for each SNP from both population, however, I'm not sure how to set and feed them to R for multiple fisher's exact tests and get the p-value for each one. Could please someone help me more on this issue?

ADD REPLY
0
Entering edit mode

Hi, I have my MAF data in the following format. snpID MAF_mysamples MAF_european

I want to compare the MAF_mysamples with MAF_european for each snp How acan I use the fisher.exact test to do..

ADD REPLY

Login before adding your answer.

Traffic: 2571 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6