HCBravoLab / metagenomeSeq

Statistical analysis for sparse high-throughput sequencing
64 stars 20 forks source link

cumNormStat(lungData) not equal to 0.7014946. #87

Open tillea opened 1 year ago

tillea commented 1 year ago

Hi, the Debian package received a bug report about two failed tests:

── Failure ('test-norm.R:28:3'): `cumNormStat` returns the correct value ───────
cumNormStat(lungData) not equal to 0.7014946.
names for target but not for current
── Failure ('test-norm.R:34:3'): `cumNormStatFast` returns the correct value ───
cumNormStatFast(lungData) not equal to 0.7014946.
names for target but not for current

[ FAIL 2 | WARN 6 | SKIP 0 | PASS 13 ]
Error: Test failures

Kind regards, Andreas.

tillea commented 1 year ago

Any idea what might be wrong here?

charles-plessy commented 12 months ago
--- a/tests/testthat/test-norm.R
+++ b/tests/testthat/test-norm.R
@@ -25,13 +25,13 @@

 test_that("`cumNormStat` returns the correct value", {
   data(lungData); data(mouseData);
-  expect_equal(cumNormStat(lungData),0.7014946)
+  expect_equal(unname(cumNormStat(lungData)),0.7014946)
   expect_equal(cumNormStat(mouseData),0.5)
 })

 test_that("`cumNormStatFast` returns the correct value", {
   data(lungData); data(mouseData);
-  expect_equal(cumNormStatFast(lungData),0.7014946)
+  expect_equal(unname(cumNormStatFast(lungData)),0.7014946)
   expect_equal(cumNormStatFast(mouseData),0.5)
 })

:)