def absolute_abundance(coverage, total_bases):
absolute = {}<EOL>for genome in coverage:<EOL><INDENT>absolute[genome] = []<EOL>index = <NUM_LIT:0><EOL>for calc in coverage[genome]:<EOL><INDENT>bases = calc[<NUM_LIT:0>]<EOL>total = total_bases[index]<EOL>absolute[genome].append((bases / total) * float(<NUM_LIT:100>))<EOL>index += <NUM_LIT:1><EOL><DEDENT><DEDENT>total_assembled = [<NUM_LIT:0> for i in absolute[genome]]<EOL>for genome in absolute:<EOL><INDENT>index = <NUM_LIT:0><EOL>for cov in absolute[genome]:<EOL><INDENT>total_assembled[index] += cov<EOL>index += <NUM_LIT:1><EOL><DEDENT><DEDENT>absolute['<STR_LIT>'] = [(<NUM_LIT:100> - i) for i in total_assembled]<EOL>return absolute<EOL>
absolute abundance = (number of bases mapped to genome / total number of bases in sample) * 100