phenoscape / rphenoscape

R package to make phenotypic traits from the Phenoscape Knowledgebase available from within R.
https://rphenoscape.phenoscape.org/
Other
5 stars 5 forks source link

Fix Resnik similarity test with KB dev-beta2 API #245

Closed johnbradley closed 2 years ago

johnbradley commented 2 years ago

The Resnik similarity test is failing when using the dev.phenoscape.org/api/v2-beta API.

── Failure (test-semsim.R:74:3): Resnik similarity ─────────────────────────────
all(sm.ic > 0) is not TRUE

This issue is part of #243

johnbradley commented 2 years ago

Here is the test that is failing: https://github.com/phenoscape/rphenoscape/blob/757b9a29b6cca80e2470a7866940b4d9be35f80c/tests/testthat/test-semsim.R#L63-L74

johnbradley commented 2 years ago

This test seems to only fail sporadically. For example it failed in the github action for R 3.6, but passed in the test for R 4. When I re-ran the github action this test passed for both R 3.6 and R4. I expect this is due to running sample() on the subsumer matrix row names.

johnbradley commented 2 years ago

I think this issue from the abandoned v2-beta2 changes may be related: https://github.com/phenoscape/rphenoscape/issues/239

johnbradley commented 2 years ago

Fixed by #248