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

Bray-Curtis issue #339

Open
antagomir opened this issue Feb 6, 2023 · 5 comments
Open

Bray-Curtis issue #339

antagomir opened this issue Feb 6, 2023 · 5 comments
Assignees

Comments

@antagomir
Copy link
Member

It was reported by @nuorenarra that the vegan "bray" dissimilarity default does not correspond to the standard version of the widely known Bray-Curtis dissimilarity.

TODO: let us consider how the defaults should be set in mia (overriding vegan defaults?). At least this is something to mention in the documentation and OMA.

@antagomir
Copy link
Member Author

@nuorenarra could you briefly describe the issue here?

@nuorenarra
Copy link

The issue is in jaccard distance, not in Bray-Curtis.

vegan package distance(method="jaccard") automatically considers abundance weighted version of jaccard, which is very similar to traditional Bray-Curtis distance. The standard definition of jaccard distance is not abundance-weighted, but simply count of shared species / sum of all unique species present in a pair. Vegan package distance function allows calculation of this traditional jaccard with an additional term distance(method="jaccard", binary=T), but since this is not well known, many mistakes have been made when people think vegan's jaccard refers to the traditional jaccard by default, which it doesn't.

@TuomasBorman
Copy link
Contributor

TuomasBorman commented Oct 17, 2023

  1. We do not have calculateDistance function. It was removed some time ago. (I think the function could be something to include)

  2. Check if runRDA function (dbrda and significance test) is working with binary parameter. --> OK, does work

  3. Check if runMDS is working with binary parameter --> OK, works

  4. Add example on jaccard distance with binary parameter to OMA

@antagomir
Copy link
Member Author

We could consider adding calculateDistance; or it could be optional to return that as part of runMDS output. But that is a separate issue. I suggest we open an issue about that if a specific need will arise.

OK I like the solution, let us clearly mention this issue in OMA, with an example.

No need to add in packages (mia, miaViz, scater..)

@antagomir
Copy link
Member Author

@nuorenarra when time allows, could you make the suggested PR to the documentation in mia and OMA on this?

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

No branches or pull requests

3 participants