-
Notifications
You must be signed in to change notification settings - Fork 27
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
Use Rbiom unifrac implementation instead of runUnifrac #523
Conversation
…e on picante::unifrac
Great! It might be good to summarize also in OMA the basis for selecting this particular implementation with just 1-3 sentences, when you update relevant part there. |
Without I selected the lines from the |
Merge branch 'devel' of https://github.com/microbiome/mia into rbiom_unifrac # Conflicts: # DESCRIPTION # NEWS
Merge branch 'rbiom_unifrac' of https://github.com/microbiome/mia into rbiom_unifrac # Conflicts: # NEWS
Merge branch 'devel' of https://github.com/microbiome/mia into rbiom_unifrac # Conflicts: # NEWS
…o rbiom_unifrac
Looks nice! However, I think it would be simpler to modify runUnifrac function --> keep the beginning of the function and replace the end with rbiom::unifrac Is that possible? |
Merge branch 'devel' of https://github.com/microbiome/mia into rbiom_unifrac # Conflicts: # NEWS
…o rbiom_unifrac
Tests fail because weighted rbiom::unifrac gives different result every time (<1e-5). Check why and add tolerance to tests |
It seems that rownames does not atch with tip labels. They should match and can be matched. Check if that is the case by debugging the lines just before rbiom::unifrac call |
Also, check what is wrong with the other error (that is not even related to this PR?) |
Alright, now the tests should be ok. I believe the stochastic nature comes from multithreading and complex tree (loops); distances between tips can be calculated multiple ways which slightly differs. After pruning, the results are the same every time. |
This PR is related to issue #336.
It replaces the function
runUnifrac
with the unifrac implementation from rbiom.The rbiom implementation does not require to aggregate the community matrix based on
nodeLab
, thus thecalculateUnifrac
method for TreeSummarizedExperiment becomes simpler.I have deleted the arguments
transposed
,BPPARAM,
andnormalized
for now because they were used byrunUnifrac
and they are not handled byrbiom::unifrac
. It may be possible to handletransposed
while using the rbiom implementation though.When running the following code on branch devel and this branch, I obtain the same unifrac values.