This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Rounding error in allele frequency estimates in PLINK

I was checking allele frequencies for a dataset using plink. In one dataset I was using the default behavior and thus plink was outputting minor allele frequencies. In the second case, I fixed the A1 allele to a given allele.

I found that in some cases, going back to MAF when fixing a given allele can produce very close but not exact allele frequencies. Here is an example:

Default:
nam_maf[nam_maf$SNP=="rs6785004",]
       CHR       SNP A1 A2     MAF NCHROBS
113692   3 rs6785004  T  C 0.04895     286 


Fixing to a particular allele:
nam[nam$SNP=="rs6785004",]
       CHR       SNP A1 A2   MAF NCHROBS   
113692   3 rs6785004  C  T 0.951     286

If I go back to MAF using the second dataset i.e. 1-0.951 , the result is 0.049, which is close but not exact. Is there a way to force plink not to round allele frequencies?

snp plink

0 answers

No answers yet.

Log in to answer this question.