Skip to content

Support UniFrac and pre-calculated dissimilarity in getPERMANOVA (#844) - #846

Merged
TuomasBorman merged 7 commits into
develfrom
844-permanova-unifrac
Sep 25, 2026
Merged

TuomasBorman merged 7 commits into
develfrom
844-permanova-unifrac

Conversation

@0xMuluh

@0xMuluh 0xMuluh commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Resolves #844. Extends getPERMANOVA and addPERMANOVA to support UniFrac and pre-calculated dissimilarity matrices. Tree-aware metrics (unifrac, overlap, jsd) are computed via mia::getDissimilarity(), and pre-calculated matrices can be retrieved via dis.name from metadata(x) or passed directly as dist objects. Also updates dispersion testing in .calculate_homogeneity() to accept distance objects directly.

0xMuluh and others added 7 commits September 8, 2026 12:51
- Add dis.name to getPERMANOVA,SummarizedExperiment to retrieve pre-calculated dissimilarity matrices from metadata(x).

- Automatically delegate to mia::getDissimilarity() when method %in% c('unifrac', 'overlap', 'jsd').

- Allow getPERMANOVA,ANY to accept dist objects directly and align sample metadata rows by sample names.

- Update .calculate_homogeneity() in runCCA.R to accept dist and symmetric matrices without re-running vegdist().

- Add unit tests covering on-the-fly UniFrac, direct dist inputs, dis.name usage, and input validations.

- Synchronize documentation and examples in man/getPERMANOVA.Rd.
@codecov

codecov Bot commented Sep 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.81%. Comparing base (859de8c) to head (19d2c8e).
⚠️ Report is 2 commits behind head on devel.

Files with missing lines Patch % Lines
R/getPERMANOVA.R 80.95% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            devel     #846      +/-   ##
==========================================
+ Coverage   74.71%   74.81%   +0.09%     
==========================================
  Files          62       62              
  Lines        7530     7543      +13     
==========================================
+ Hits         5626     5643      +17     
+ Misses       1904     1900       -4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TuomasBorman
TuomasBorman merged commit 2cba739 into devel Sep 25, 2026
5 checks passed
@TuomasBorman
TuomasBorman deleted the 844-permanova-unifrac branch September 25, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add/getPERMANOVA cannot be used with UniFrac

2 participants