def find_n90(contig_lengths_dict, genome_length_dict):
<EOL>n90_dict = dict()<EOL>for file_name, contig_lengths in contig_lengths_dict.items():<EOL><INDENT>currentlength = <NUM_LIT:0><EOL>for contig_length in contig_lengths:<EOL><INDENT>currentlength += contig_length<EOL>if currentlength >= genome_length_dict[file_name] * <NUM_LIT>:<EOL><INDENT>n90_dict[file_name] = contig_length<EOL>break<EOL><DEDENT><DEDENT><DEDENT>return n90_dict<EOL>
Calculate the N90 for each strain. N90 is defined as the largest contig such that at least 9/10 of the total
genome size is contained in contigs equal to or larger than this contig
:param contig_lengths_dict: dictionary of strain name: reverse-sorted list of all contig lengths
:param genome_length_dict: dictionary of strain name: total genome length
:return: n75_dict: dictionary of strain name: N90