Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRG] add query name to CSV output of sbt categorize #421

Merged
merged 3 commits into from
Mar 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion sourmash_lib/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,8 @@ def categorize(args):

if args.csv:
w = csv.writer(args.csv)
w.writerow([queryfile, best_hit_query_name, best_hit_sim])
w.writerow([queryfile, query.name(), best_hit_query_name,
best_hit_sim])

if loader.skipped_ignore:
notify('skipped/ignore: {}', loader.skipped_ignore)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_sourmash.py
Original file line number Diff line number Diff line change
Expand Up @@ -2873,7 +2873,7 @@ def test_sbt_categorize():
assert 'for s10+s11, found: 0.50 genome-s10.fa.gz' in err

out_csv = open(os.path.join(location, 'out.csv')).read()
assert './4.sig,genome-s10.fa.gz,0.50' in out_csv
assert './4.sig,s10+s11,genome-s10.fa.gz,0.50' in out_csv


def test_sbt_categorize_already_done():
Expand Down