Repository 'cpt_protein_blast_grouping'
hg clone https://toolshed.g2.bx.psu.edu/repos/cpt/cpt_protein_blast_grouping

Changeset 5:11701cc63084 (2024-08-08)
Previous changeset 4:258afe02e34a (2024-08-08)
Commit message:
planemo upload commit 12a58961f0eb41803c1954ac8c2543ed7c56186f
modified:
protein_blast_grouping.py
b
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,