This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to calculate minor allele frequency for each snp across samples

Hello everyone, I have a genotype file.

![dput(gt_df\[1:5,1:5\])
structure(list(`GTEX-1117F` = c(0L, 0L, 0L, 1L, 0L), `GTEX-111FC` = c(0L, 
0L, 0L, 2L, 0L), `GTEX-1128S` = c(0L, 0L, 0L, 2L, 0L), `GTEX-117XS` = c(0L, 
0L, 0L, 1L, 0L), `GTEX-1192X` = c(0L, 0L, 0L, 1L, 0L)), row.names = c("22_20000222_C_T_b38", 
"22_20000320_A_C_b38", "22_20000538_C_T_b38", "22_20000722_G_A_b38", 
"22_20001035_C_T_b38"), class = "data.frame")][1]

I want to calculate minor allele frequency for each snp(eg: 22_20000222_C_T_b38 ) across the samples. So basically for this SNP: 22_20000222_C_T_b38 I want to calculate its maf across all the 205 samples. Is there any way or formula to do it. Thank you.

maf snp genotype

0 answers

No answers yet.

Log in to answer this question.