def get_gtcounts_by_sample(conn, metadata, args):
    idx_to_sample = util.map_indices_to_samples(metadata)

    # report.
    print '\t'.join(['sample', 'num_hom_ref', 'num_het',
                     'num_hom_alt', 'num_unknown', 'total'])

    query = "SELECT *, \
             (num_hom_ref + num_het + num_hom_alt + num_unknown) as total \
             FROM sample_genotype_counts"
    res = conn.execute(query)
    # count the number of each genotype type obs. for each sample.
    for row in res:
        sample = idx_to_sample[row['sample_id'] -1]
        print "\t".join(str(s) for s in [sample,
                                         row['num_hom_ref'],
                                         row['num_het'],
                                         row['num_hom_alt'],
                                         row['num_unknown'],
                                         row['total']])
Initialize this instance with its attributes. We only document the ones
dataset/ETHPy150Open arq5x/gemini/gemini/gemini_stats.py/get_gtcounts_by_sample--crossover with--dataset/ETHPy150Open gitpython-developers/GitPython/git/objects/submodule/base.py/Submodule.__init__