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

BUG: improve error message formatting in feature-table tabulate-seqs #300

Merged
merged 4 commits into from
Dec 21, 2023
Merged
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
6 changes: 3 additions & 3 deletions q2_feature_table/_summarize/_visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def tabulate_seqs(output_dir: str, data: DNAIterator,
metadata_df.index)
elif merge_method == 'strict':
if set(metadata_df.index) != display_sequences:
raise Exception('Merge method is strict and IDs do not match')
raise ValueError('Merge method is strict and IDs do not match')
if taxonomy is not None:
for member in taxonomy.values():
if merge_method == 'union':
Expand All @@ -69,8 +69,8 @@ def tabulate_seqs(output_dir: str, data: DNAIterator,
member.index)
elif merge_method == 'strict':
if set(member.index) != display_sequences:
raise Exception('Merge method is strict and IDs do not \
match')
raise ValueError(
'Merge method is strict and IDs do not match')

seq_len_stats = _compute_descriptive_stats(seq_lengths)
_write_tsvs_of_descriptive_stats(seq_len_stats, output_dir)
Expand Down