Skip to content

Commit

Permalink
Uses tabs
Browse files Browse the repository at this point in the history
[#9]
  • Loading branch information
curtisim0 committed Aug 8, 2024
1 parent 120ca2f commit 1098c37
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions cpt_protein_blast_grouping/protein_blast_grouping.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,12 @@ def print_results(
top_hits = self.get_top_hits(num_hits, sort_key)
print(f"# Top {num_hits} Hits", file=output_file)
print(
"{:>4} {:<20} {:>10} {:>10}".format(
"Rank", "Phage Name", "Unique Query Matches", "Unique Subject Hits"
),
"Rank\tPhage Name\tUnique Query Matches\tUnique Subject Hits",
file=output_file,
)
for rank, (organism, data) in enumerate(top_hits):
print(
"{:>4} {:<50} {:<25} {:<25}".format(
rank,
organism,
len(data["unique_queries"]),
len(data["unique_hits"]),
),
f"{rank}\t{organism}\t{len(data['unique_queries'])}\t{len(data['unique_hits'])}",
file=output_file,
)

Expand Down

0 comments on commit 1098c37

Please sign in to comment.