The following code (which is not from Bioconductor) produces very nice output for ONE allele of a SNP (often the allele with the second largest frequency - usually termed the minor allele). It gives an average minor allele frequency from all NCBI sources (which is what I want, with the addition of data for all alleles of a SNP) plus a table of minor allele frequencies from each source (which would also be nice - but not necessary). Does there exist coding in Bioconductor which could extract the data from NCBI for all the alleles of a SNP ? Many thanks.
remotes::install_github("ropensci/rsnps")
# Define the SNP ID
snp_id <- "rs11134679" ## this SNP has alleles A, C, G and T, but results are only for A
# Query the dbSNP database
result <- rsnps::ncbi_snp_query(snp_id)
result2 <- as.data.frame(result)
result2
result2$maf_population
many thanks - yes I probably would want the new "dbGaP_PopFreq" source.