Skip to content

Commit

Permalink
f-string format for discriminatory features warning, log number of di…
Browse files Browse the repository at this point in the history
…scrim feats
  • Loading branch information
yangchen2 committed Jan 19, 2024
1 parent 33b8985 commit 71de05c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qadabra/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ def _validate_input(
discriminating_feats = feat_presence[~feat_presence].index.tolist()

if len(discriminating_feats) > 0:
warning_msg = "Some features in the table perfectly discriminate factor groups:\n" + '\n'.join(discriminating_feats) + ".\nAutomatically filtering out these features before running Qadabra..."
print("Number of discriminating features: " + str(len(discriminating_feats)))
logger.warn("Number of discriminating features: " + str(len(discriminating_feats)))
warning_msg = f"Some features in the table perfectly discriminate factor groups. Automatically filtering out {len(discriminating_feats)} features before running Qadabra..."
warnings.warn(warning_msg, category=Warning)

# Filtering out the discriminating features from the BIOM table
Expand Down

0 comments on commit 71de05c

Please sign in to comment.