Question: Converting genotypes to allele frequencies
gravatar for 110300553
8 days ago by
1103005530 wrote:

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.

snp R genome • 88 views
ADD COMMENTlink modified 8 days ago by JC7.4k • written 8 days ago by 1103005530

Can you provide example file, something like: myData[ 1:10, 1:10 ] ?

ADD REPLYlink written 8 days ago by zx87546.5k
gravatar for JC
8 days ago by
JC7.4k wrote:

You probably need to create a script that does the conversion, you can use the NCBI API ( to query each rs and define which allele is the reference (0) and any other allel (1,2, ...)

ADD COMMENTlink written 8 days ago by JC7.4k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1689 users visited in the last hour