qiime2 / q2cli

Command line interface for QIIME 2
BSD 3-Clause "New" or "Revised" License
19 stars 24 forks source link

BUG: CLI says missing metdata-file when a metadata column is not passed in. #327

Closed cherman2 closed 7 months ago

cherman2 commented 9 months ago

Improvement Description When there is a required metadata column and you only pass in the metadata-file, you get an error that says "(1/1) Missing option '--m-metadata-file'." . This feels like a confusing error because I am actually missing a metadata column.

Recreation Steps

  1. Run Beta group significance or another method that requires a --m-metadata-column.
  2. Input a metadata file but not a metadata column
  3. see error 😱

Current Behavior

When a metadata column is required but not passed in the error says you are missing the metadata file.

Screenshot 2023-12-12 at 8 19 12 AM

Proposed Behavior QIIME should tell users that they are missing a metadata column instead of telling users they are missing a metadata file.

Comments

  1. I believe this is a cli issue because in the python interface has you pass in a metadata column so this error will only occur in the cli.
  2. I have found this error in diversity beta-group-significance and sample-classifier fit-classifier
lizgehret commented 8 months ago

Thanks for submitting this issue @cherman2, all of the details above were very helpful!

This is coming from q2cli, and it seems like it's something funny with the way the metadata column vs. file are handled as click params. I was able to force the error we'd like to see to the surface with a little indirection (screenshot below): Screen Shot 2023-12-27 at 4 47 54 PM

It seems like we need to add some sort of special handling for metadata file/column distinction here, but I'm still sorting through that.

lizgehret commented 8 months ago

Fixed by #329