adw96 / DivNet

diversity estimation under ecological networks
83 stars 18 forks source link

Can phylodivnet be added to betaDiversity vignette? #107

Closed msmcfarlin closed 2 years ago

msmcfarlin commented 2 years ago

Hello!

Thank you for the amazing packages breakaway and DivNet.

I've been exploring the vignettes and functions in these packages and came across the function phylodivnet. I didn't see it in any of the vignettes but it appears to be for unifrac distance calculation for evaluating beta diversity? Can an example with phylodivnet be added to the beta diversity vignette?

I tried running phylodivnet with a phyloseq object that includes a phylogenetic tree and a diagonal design matrix like I would when running divnet for beta diversity estimation and received the error... Error in dimnames(x) <- dn : length of 'dimnames' [2] not equal to array extent

I'm running this on a dataset that I collapsed to the phylum level. Could this error be related to that? That the number of taxa doesn't reflect the tips of the phylogenetic tree?

Thanks!

adw96 commented 2 years ago

Hi @msmcfarlin -- unfortunately we looked into this a few years ago and doing this properly was computationally infeasible. At this time it is triaged; sorry. I won't close your issue, but just so you know, we won't be prioritizing this at the moment.

Thanks for understanding -- there's so many cool stats things that we're working on instead!

mooreryan commented 2 years ago

Out of curiosity, did you find the unifrac distance calculation itself was the bottleneck? (Say as compared to other beta diversity measures like Euclidean or bray Curtis?)

adw96 commented 2 years ago

Actually, we decided that if we wanted to truly estimate the uncertainty in e.g., UniFrac, we should account for the uncertainty in estimating the tree as well... and that was the bottleneck. I don't like underestimating variance, so we decided to leave this alone and focus our phylogenetic uncertainty investigations elsewhere -- @svteichman is making amazing progress on this! (but it won't look like DivNet) Happy to answer more questions @mooreryan , and @paulinetrinh can chime in too if there's anything I've forgotten.

msmcfarlin commented 2 years ago

Thanks @adw96 for update! I look forward to following the work from you guys, these are some very interesting and useful packages.

adw96 commented 2 years ago

Closing - as mentioned above, this was triaged.