You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
raiseAugurError(f"Query contains a column that does not exist in metadata.") frome
Possible solution
Both checks are beneficial, so it doesn't make sense to remove either. Instead, the warning text could be updated to indicate potential issues:
WARNING: Column 'QC_rare_mutations' does not exist in the metadata file. This may cause subsequent errors.
ERROR: Query contains a column that does not exist in metadata.
The text was updated successfully, but these errors were encountered:
I would think if you're going to be making changes here, updating the second (error) message to include the name of the missing column would be a good improvement — it will make the combination of messages overall more clear because it will be apparent that both of them are about the same column.
updating the second (error) message to include the name of the missing column would be a good improvement
I agree, and looked into this briefly. Pandas's UndefinedVariableError does not expose the column name apart from being in the error message text name 'QC_rare_mutations' is not defined, and parsing it from there feels wrong. Maybe a good compromise would be to tack on the entire Pandas error message like this:
WARNING: Column 'QC_rare_mutations' does not exist in the metadata file. This may cause subsequent errors.
ERROR: Query contains a column that does not exist in metadata: name 'QC_rare_mutations' is not defined
@huddlej noted in nextstrain/mpox#273 (comment) that this output comes across as a bug (that a warning is also an error):
This happens because the columns are effectively checked twice:
read_metadata
which does not error by design:augur/augur/io/metadata.py
Lines 124 to 127 in d8faf01
Evaluation of the query:
augur/augur/filter/include_exclude_rules.py
Lines 243 to 247 in d8faf01
Possible solution
Both checks are beneficial, so it doesn't make sense to remove either. Instead, the warning text could be updated to indicate potential issues:
The text was updated successfully, but these errors were encountered: