This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Calculate allele frequencies per population with SNPRelate

Hi all, I am trying to use SNPRelate R package for some analysis and I began calculating allele frequencies from plink data with the function snpgdsSNPRateFreq. However I didn't find any way to do these calculations per group or population. Can anybody help me with that? Or is there any other package apropriate for doing that? Thanks in advance!

snprelate allelefrequencies plink snp r

1 answer

Hi,

I don't know the SNPRelate package, but you can use plink_to_afs() from the R admixtools2 package. It calculates allele frequency spectra for populations as defined in your plink dataset, but you can also provide your own population definitions.

Log in to answer this question.