qiime2 / provenance-lib

QIIME 2 Provenance Replay Tools
BSD 3-Clause "New" or "Revised" License
3 stars 4 forks source link

Metadata .tsvs lost in replay with multiple metadata inputs #97

Open ChrisKeefe opened 2 years ago

ChrisKeefe commented 2 years ago

When a command takes a .tsv and a .qza as metadata, the UUID of the .qza is captured, and the internal-use file name where the merged metadata was saved. As a result, Replay has no way of determining how many metadata inputs were originally passed, and is only able to render the handling of the .qza (and a warning message that there may be things missing). The same "masking" of inputs occurs when multiple .tsv files are passed.

Commands like longitudinal first-differences and empress plotting, which regularly take both a sample metadata tsv and one or more artifact as metadata cannot be replayed without manual editing in this case. This bug does not impact users who are re-running from captured metadata.

Metadata identity of some kind is probably a requirement for this fix, and may already be adequately supported in https://github.com/qiime2/qiime2/pull/464

ChrisKeefe commented 2 years ago

CLI users impacted by this can add work around it by adding extra --m- parameter lines to their rendered scripts as needed. Artifact API users will need some_metadata.merge(other_metadata1, other_metadata_2, ...) to do the same.