Skip to content

Default getMDS and addMDS to no feature filtering (ntop = Inf) - #794

Open
0xMuluh wants to merge 13 commits into
develfrom
mds
Open

0xMuluh wants to merge 13 commits into
develfrom
mds

Conversation

@0xMuluh

@0xMuluh 0xMuluh commented Dec 8, 2025 •

Copy link
Copy Markdown
Collaborator

Summary of Changes

  • Set ntop = Inf by default in mia::getMDS and mia::addMDS so that all features are retained before running MDS, avoiding unintended feature filtering in the microbiome context (unlike scater::calculateMDS which defaults to ntop = 500).
  • Updated documentation in R/getMDS.R and man/addMDS.Rd describing feature retention and how to supply a finite ntop or subset.row if feature filtering is desired.
  • Updated unit tests in tests/testthat/test-addMDS.R.

Relates to microbiome/OMA#824.

0xMuluh and others added 5 commits December 8, 2025 09:43
Co-authored-by: Muluh <127390183+Daenarys8@users.noreply.github.com>
Co-authored-by: Tuomas Borman <60338854+TuomasBorman@users.noreply.github.com>
…is: "Correspondance" → "Correspondence" (#792)

Co-authored-by: Tuomas Borman <60338854+TuomasBorman@users.noreply.github.com>
Signed-off-by: Daena Rys <rysdaena8@gmail.com>
Comment thread R/getMDS.R Outdated
Comment on lines +20 to +21
#' By default \code{scater::calculateMDS} keeps only the \code{ntop = 500}
#' most variable features. When rarefaction is enabled (\code{niter > 0}) the

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does the R code throw a warning of this if it does not use all features? (if data has more than 500)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we have mia::getMDS and mia::addMDS, we could set the default to no filtering. At least, I have not heard that variance filtering is commonly used in MDS in microbiome context (or then authors of papers have not explicitly stated that)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I would also set the default to no filtering.

We can show examples on how to add filtering.

Copilot AI review requested due to automatic review settings December 14, 2025 22:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@TuomasBorman

Copy link
Copy Markdown
Contributor

@0xMuluh Can you update the PR based on discussion?

@0xMuluh 0xMuluh changed the title https://github.com/microbiome/OMA/issues/824 Default getMDS and addMDS to no feature filtering (ntop = Inf) Oct 9, 2026

This branch has not been deployed

No deployments
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.

7 participants