def genome_lengths(fastas, info):
if info is False:<EOL><INDENT>info = {}<EOL><DEDENT>for genome in fastas:<EOL><INDENT>name = genome.rsplit('<STR_LIT:.>', <NUM_LIT:1>)[<NUM_LIT:0>].rsplit('<STR_LIT:/>', <NUM_LIT:1>)[-<NUM_LIT:1>].rsplit('<STR_LIT>')[<NUM_LIT:0>]<EOL>if name in info:<EOL><INDENT>continue<EOL><DEDENT>length = <NUM_LIT:0><EOL>fragments = <NUM_LIT:0><EOL>for seq in parse_fasta(genome):<EOL><INDENT>length += len(seq[<NUM_LIT:1>])<EOL>fragments += <NUM_LIT:1><EOL><DEDENT>info[name] = {'<STR_LIT>':length, '<STR_LIT>':fragments}<EOL><DEDENT>return info<EOL>
get genome lengths