I found out the only way to get genotype frequency programmatically from 1000 genomes is via the Perl API as per this answer: Genotype Frequency from Ensembl BiomaRt
Following the instructions here: http://asia.ensembl.org/info/docs/api/variation/variation_tutorial.html?redirect=no, I can see how to get specific genotypes for all individuals as a list:
Is there a way through the Perl API that I can get the actual population genotype frequency as a single returned value for a specific SNP?
E.g., Input -> Some snp, CEU... Output -> G/G 0.87, G/A 0.13 (frequency of some snp for CEU population).
I need to do this for 100,000+ SNPs, so I imagine manually pulling all genotypes for each SNP and calculating the frequency manually in a loop would not be practical.
Just a simple example command or link to where this is shown would be perfect.
Well the instructions at http://asia.ensembl.org/info/docs/api/variation/variation_tutorial.html?redirect=no do include a section for Alleles and frequencies. Have you tried using the sample code given in this section? Given a snp it should be able to the frequency for each allele across multiple populations.
Yeah I have, but I'm specifically after genotype frequencies, not allele frequencies.