david-barnett / microViz

R package for microbiome data visualization and statistics. Uses phyloseq, vegan and the tidyverse. Docker image available.
https://david-barnett.github.io/microViz/
GNU General Public License v3.0
94 stars 10 forks source link

Better error message for UniFrac distances? - issue #53 #168

Open alejandrocs98 opened 1 week ago

alejandrocs98 commented 1 week ago

Hi David,

Thanks for developing and maintaining MicroViz, what a wonderful tool.

I would like to suggest changing the error message for this issue: @david-barnett in https://github.com/david-barnett/microViz/issues/53#issuecomment-1162229318. I wanted to calculate UiFrac distances and got this same error. I spent so much time trying different things to fix it and did not expected that the error was simply for a parameter (that with other distances worked fine). Also, as this issue is closed it took me longer to get to the solution.

Thanks!

david-barnett commented 1 week ago

Hi Alejandro,

Glad you're finding microViz useful 🙂

Currently the error message (when you aggregate taxa before trying to use a unifrac distance) includes the line:

unifrac distances require un-aggregated taxa and a phylogenetic tree

Do you have a suggestion for making this clearer? e.g. what helped you to understand the problem eventually?

cheers David

alejandrocs98 commented 5 days ago

Hi David,

The error message is fine. It was more my bias than anything. When I got the error I instantly assumed that the phylogenetic tree was the problem, when actually the taxa aggregation was the issue. Although, when searching how to fix this issue almost all blogs and prompts (from AI tools) suggested that the phylogenetic tree was the problem, which might have contributed with my confusion. But to be fair that has nothing to do with the code or the documentation. It really is a very nice tool.

Thank you very much.