Skip to content

Commit

Permalink
Sort by evalue on best_hits.csv as well
Browse files Browse the repository at this point in the history
  • Loading branch information
jamaliki authored Nov 22, 2023
1 parent c51e611 commit e287a76
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions model_angelo/apps/hmm_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ def main(parsed_args):
# Keep track of unique chains by target name with the lowest E-value and store separately
min_evalue_indices = hits_df.groupby('target_name')['E-value'].idxmin()
filtered_df = hits_df.loc[min_evalue_indices]
# Sort hits by lowest E-value to highest
filtered_df.sort_values(by=["E-value"], inplace=True)
filtered_df.to_csv(os.path.join(parsed_args.output_dir, "best_hits.csv"), index=False)

print("-" * 70)
Expand Down

0 comments on commit e287a76

Please sign in to comment.