def get_snpcounts(conn, metadata, args):
    query = "SELECT ref, alt, count(1) \
             FROM   variants \
             WHERE  type = \'snp\' \
             GROUP BY ref, alt"

    # get the ref and alt alleles for all snps.
    res = conn.execute(sql.text(query))
    print '\t'.join(['type', 'count'])
    for row in res:
        print '\t'.join([str(row['ref']) + "->" + str(row['alt']),
                         str(row['count(1)'])])
Report the count of each type of SNP.
dataset/ETHPy150Open arq5x/gemini/gemini/gemini_stats.py/get_snpcounts