qiime2 / q2cli

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

allow qiime tools peek to take multiple arguments #279

Closed gregcaporaso closed 1 year ago

gregcaporaso commented 1 year ago

I often run into an issue where I have a uuid (say for a feature table) from reviewing a provenance graph, and I want to know which of the many feature tables in my working directory is the one with that uuid. This requires me to run qiime tools peek on each and figure out which is the one with the uuid I'm looking for.

It would be helpful if qiime tools peek could take multiple arguments, potentially using a command line wild card. For example:

$ qiime tools peek table*.qz*
Filename       Type                                UUID                                    Data format
table1.qza     FeatureTable[Frequency]             199c6e1a-a77d-4b32-8cbf-42e18d7fc804    BIOMV210DirFmt
table1.qzv     Visualization                       abcdc7f7-e317-4f85-be04-1d2c08db503b    n/a
table2.qza     FeatureTable[RelativeFrequency]     426011ba-45c6-46b3-8b20-b1c595ba1cca    BIOMV210DirFmt
lizgehret commented 1 year ago

Discussed with @gregcaporaso offline and the functionality for this should look like the following:

  1. Single file input will remain unchanged.
  2. Multi-file input will produce a nicely formatted (human-readable) output like the above example.
  3. Adding a --tsv parameter that will work for either single or multi-line inputs, and will produce a tab-separated result (machine-readable) similar to qiime tools inspect-metadata that can be copied/pasted or piped into a file for use in external programs/analyses.