EcoJulia / Microbiome.jl

For analysis of microbiome and microbial community data
Other
48 stars 10 forks source link

mantel test #127

Closed EvoArt closed 2 years ago

EvoArt commented 2 years ago

see bottom of here for a rough and ready mantel test implementation https://github.com/EvoArt/Diversity.jl/blob/dev/src/Testing/permutation_tests.jl There's lot's more can be added (two tailed test, rank correlation, partial mantel test).

I'm not sure where all this kind of code should be living though. The kind of stats community ecologists tend to do, should we be keeping them under Diversity.jl (or another community ecology package) to be looked after by ecologists, or should it all be in MultivariateStats (or even StatsBase)? Maybe the latter is more sensible.

mkborregaard commented 2 years ago

Maybe https://github.com/EcoJulia/RandomBooleanMatrices.jl could be expanded to contain stuff like this too?

kescobo commented 2 years ago

I'm not sure where all this kind of code should be living though. The kind of stats community ecologists tend to do, should we be keeping them under Diversity.jl (or another community ecology package) to be looked after by ecologists, or should it all be in MultivariateStats (or even StatsBase)? Maybe the latter is more sensible.

Or maybe HypothesisTests.jl

Another thought would be to make an EcoStats.jl package, but in general, I'm most in favor of having small packages that do defined things. At first, I developed a bunch of stuff for myself in Microbiome.jl, but I've been trying to move as much as possible out of it to other relevant packages, and then depending on those packages. Eg, I initially had a within-package Bray Curtis dissimilarity function, but decided to instead put it into Distances.jl, and then depend on that package.

So here's another thought: pull out anything that could be used for both mantel testing and PERMANOVA into a PermutationTestsBase.jl or something, then have PERMANOVA.jl and Mantel.jl depend on that. At some point, we might want to make EcoStats.jl package that uses / reexports those other packages, but