# HG changeset patch # User cpt # Date 1723089866 0 # Node ID 11701cc63084b6041a33a4f24188a2c5beac00d4 # Parent 258afe02e34a7e37eabe22fe55d176fefc4f2876 planemo upload commit 12a58961f0eb41803c1954ac8c2543ed7c56186f diff -r 258afe02e34a -r 11701cc63084 protein_blast_grouping.py --- a/protein_blast_grouping.py Thu Aug 08 03:52:37 2024 +0000 +++ b/protein_blast_grouping.py Thu Aug 08 04:04:26 2024 +0000 @@ -42,12 +42,12 @@ self, num_hits, sort_key="unique_queries", output_file=sys.stdout ): top_hits = self.get_top_hits(num_hits, sort_key) - print(f"# Top {num_hits} Hits", file=output_file) print( "Rank\tPhage Name\tUnique Query Matches\tUnique Subject Hits", file=output_file, ) - for rank, (organism, data) in enumerate(top_hits): + for r, (organism, data) in enumerate(top_hits): + rank = r + 1 # 1-based ranking print( f"{rank}\t{organism}\t{len(data['unique_queries'])}\t{len(data['unique_hits'])}", file=output_file,