This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How calculate MAF from impute2 output in R

Hi, I would like to know how could I procede to calculate the MAF for each SNP from a dataset of this type (output of impute2):

1 154970 rs184960399:50050116:G:A G A 1 0 0 1 0 0 1 0 0
2 154970 22:50050187:A:G A G 1 0 0 0.999 0.001 0 1 0 0
3 154970 22:50050266:G:A G A 1 0 0 1 0 0 1 0 0
4 154970 rs76985604:50050385:A:G A G 1 0 0 0.992 0.008 0 1 0 0

Each row is a SNP and from column 6th I have the probabilities of the three genotypes for each individual.

Thanks

snp maf impute2

You should have .info file from impute2's run. That file has exp_freq_a1 column per SNP. It tells frequency for a1 allele.

1 answer

We can use SNPTEST summary stats option: --summary_stats_only

./snptest \
-summary_stats_only \
-data ./example/cohort1.gen ./example/cohort1.sample ./example/cohort2.gen ./example/cohort2.sample \
-o ./example/ex.out

Which will have output with column all_maf:

Minor allele frequencies (MAF) in the combined controls, combined cases and combined across all cohorts.

Hi, I forgot to remove 'related' individuals in the pre-imputation QC steps, what should I do if I want to remove these relatives from the impute2 out put file? Thanks

Log in to answer this question.