microbiome / mia

Microbiome analysis
https://microbiome.github.io/mia/
Artistic License 2.0
45 stars 25 forks source link

fix addDominant test #567

Closed thpralas closed 3 weeks ago

thpralas commented 4 weeks ago

This PR aims to fix the following failing test:

── Failure ('test-5dominantTaxa.R:44:9'): getDominant ──────────────────────────
colData(addDominant(tse, rank = "Genus", na.rm = FALSE, name = "dominant"))$dominant[1:15] not equal to `exp.vals.two`.
8/15 mismatches
x[1]: "Class:Thermoprotei"
y[1]: "Genus:CandidatusSolibacter"

x[2]: "Class:Thermoprotei"
y[2]: "Genus:MC18"

x[3]: "Class:Thermoprotei"
y[3]: "Class:Chloracidobacteria"

x[7]: "Class:Thermoprotei"
y[7]: "Family:Moraxellaceae"

x[12]: "Class:Thermoprotei"
y[12]: "Family:ACK-M1"

The issue was that the default value of onRankOnly in agglomerateByRank is TRUE so addDominant needed to be explicitly called with onRankOnly = FALSE as it was done for getDominant.

TuomasBorman commented 4 weeks ago

Alright, thanks for checking this. So this PR https://github.com/microbiome/mia/pull/556/files should already fix the problem. Let's wait until the PR is merged and check.

TuomasBorman commented 3 weeks ago

Can you check whether this change is needed anymore?

thpralas commented 3 weeks ago

Can you check whether this change is needed anymore?

This change is not needed anymore, the test is not failing anymore on devel branch.

TuomasBorman commented 3 weeks ago

Thanks, closing