Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UX Bug: beta allows RelativeFrequency, Type errors on RF with unsupported metrics #296

Open
jkibilds opened this issue Oct 2, 2020 · 4 comments
Assignees

Comments

@jkibilds
Copy link

jkibilds commented Oct 2, 2020

In QIIME2-2020.8.0, the description of qiime diversity beta function says it accepts FeatureTable[Frequency | RelativeFrequency | PresenceAbsence] artefacts as input. In reality, if a FeatureTable[RelativeFrequency] artefact is passed as input, an error is generated.
The command I used:

qiime diversity beta --i-table merged-features-relfreq.qza --p-metric 'braycurtis' --o-distance-matrix bc-dist-matrix.qza

The error I got:

Plugin error from diversity:

  Parameter 'table' requires an argument of type FeatureTable[Frequency]. An argument of type FeatureTable[RelativeFrequency] was passed.

Debug info has been saved to /tmp/qiime2-q2cli-err-h7d8fwcx.log

I noticed that in previous version (QIIME2-2020.6), the description of qiime diversity beta function only listed FeatureTable[Frequency] as an input option. Apparently, the description has been updated, but not the function itself.

@thermokarst
Copy link
Contributor

Apparently, the description has been updated, but not the function itself.

The bray curtis implementation doesn't currently support FeatureTable[RelativeFrequency], but other beta metrics do, like jaccard. @ChrisKeefe, care to comment?

@ChrisKeefe
Copy link
Collaborator

Good eye, @jkibilds! Thanks for bringing this to our attention.

As @thermokarst mentioned, Bray-Curtis does not currently support relative frequency tables, but other metrics do. In order to allow beta to dispatch to metrics with looser type constraints, we opened it up to accept new FeatureTable subtypes.

So... I think it's good that beta can take various FeatureTable subytpes, and good that individual metrics won't let you pass unsupported types. The documentation could be clearer about this, though, and the error message is not very helpful.

I think this should be moved over to q2-diversity for now as an open issue - hopefully this is something I can tackle before YE2020.

@ChrisKeefe ChrisKeefe transferred this issue from qiime2/qiime2 Oct 14, 2020
@ChrisKeefe ChrisKeefe changed the title FeatureTable[RelativeFrequency] input doesnt work for diversity beta UX Bug: beta allows RelativeFrequency, Type errors on RF with unsupported metrics Oct 14, 2020
@thermokarst
Copy link
Contributor

@ChrisKeefe - Constraining the types via TypeMatch will allow this to work as-expected, and can go a long way to provided documentation, too.

@ChrisKeefe ChrisKeefe self-assigned this Oct 14, 2020
@ChrisKeefe
Copy link
Collaborator

Forum xref

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants