Converting genotypes to allele frequencies
I have a table of genotpyes (AA, GG, CT etc.) per sample and their corresponding rsids. I don't have any other corresponding files, just this .txt table, is there a way for me to batch convert these to allele counts in R(0,1,2)? I've found a lot of people doing this individually by SNP but I have 100K + rsids and want to examine them all.
• 1,564 views
•
link
1 answer
You probably need to create a script that does the conversion, you can use the NCBI API (https://api.ncbi.nlm.nih.gov/variation/v0/#/) to query each rs and define which allele is the reference (0) and any other allel (1,2, ...)
• 0 views
•
link
Log in to answer this question.
Can you provide example file, something like:
myData[ 1:10, 1:10 ]?