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

RDA speedup #633

Open
antagomir opened this issue Aug 27, 2024 · 0 comments
Open

RDA speedup #633

antagomir opened this issue Aug 27, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@antagomir
Copy link
Member

Running mia::runRDA can be very slow for large data sets. This is problem in particular when we want to calculate alternative RDA models with different formula (e.g. assay ~ BMI + AGE vs. assay ~ BMI vs. assay ~ AGE etc), as in:

mia::runRDA(tse, 
                assay.type = "relabundance",
                formula = assay ~ BL_AGE + MEN,
                distance = "bray",
                na.action = na.exclude)

One problem is that the beta diversity is here re-calculated for every combination.

Speedups could be obtained by using pre-calculated beta diversity matrix, stored in TreeSE object and then supporting the use of that instead, e.g. something like:

mia::runRDA(meta(tse)$betadiv, 
                assay.type = "relabundance",
                formula = assay ~ BL_AGE + MEN,
                distance = "bray",
                na.action = na.exclude)

Implementation details can be discussed but this would be a substantial improvement.

@antagomir antagomir added the enhancement New feature or request label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants