how to calculate minor allele frequency for each snp across samples
0
0
Entering edit mode
20 months ago
rheab1230 ▴ 140

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 • 396 views
ADD COMMENT

Login before adding your answer.

Traffic: 2082 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