def print_stats(genomes):
header = ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>','<STR_LIT>', '<STR_LIT>','<STR_LIT>', '<STR_LIT>','<STR_LIT>', '<STR_LIT>','<STR_LIT>']<EOL>print('<STR_LIT:\t>'.join(header))<EOL>for genome, contigs in list(genomes.items()):<EOL><INDENT>for contig, samples in list(contigs.items()):<EOL><INDENT>for sample, stats in list(samples.items()):<EOL><INDENT>for locus, rates in list(stats['<STR_LIT>'].items()):<EOL><INDENT>length = rates['<STR_LIT:info>']['<STR_LIT>']<EOL>position, strand = rates['<STR_LIT:info>']['<STR_LIT>']<EOL>position = '<STR_LIT>' % position<EOL>out = [genome, contig, locus, position, strand, length,sample, '<STR_LIT>' % (rates['<STR_LIT>']),rates['<STR_LIT>'], rates['<STR_LIT>'],rates['<STR_LIT>'], rates['<STR_LIT>'],rates['<STR_LIT:info>']['<STR_LIT>'][<NUM_LIT:0>]]<EOL>print('<STR_LIT:\t>'.join([str(i) for i in out]))<EOL><DEDENT><DEDENT><DEDENT><DEDENT>
print substitution rate data to table
genomes[genome][contig][sample] = \
        {'bp_stats':{}, 'sub_rates'[locus] = {ref PnPs, consensus PnPs}}