def set_best_hit_values_for_proteins(self, OrganismDB):
for org in OrganismDB.organisms:<EOL><INDENT>print('<STR_LIT>', org.name)<EOL>for prot in org.proteins:<EOL><INDENT>if len(prot.hmm_hit_list) > <NUM_LIT:0>:<EOL><INDENT>try:<EOL><INDENT>dd_df = prot.hit_dataframe.drop_duplicates(subset='<STR_LIT>')<EOL>try:<EOL><INDENT>prot.hit_name_best = dd_df.bitscore.idxmax()<EOL>prot.hit_evalue_best = dd_df.ix[prot.hit_name_best].evalue<EOL>prot.hit_bitscore_best = dd_df.ix[prot.hit_name_best].bitscore<EOL>prot.hit_bias_best = dd_df.ix[prot.hit_name_best].bias<EOL>prot.hit_start_best = dd_df.ix[prot.hit_name_best].hsp_start<EOL>prot.hit_end_best = dd_df.ix[prot.hit_name_best].hsp_end<EOL><DEDENT>except:<EOL><INDENT>print('<STR_LIT>', org.name)<EOL><DEDENT><DEDENT>except AttributeError:<EOL><INDENT>pass<EOL><DEDENT><DEDENT><DEDENT><DEDENT>
Iterate through all proteins in the DB,
drop duplicates in the hit_dataframe, then store the maximum
hit information as protein attributes.