Skip to content

Commit a3fde3d

Browse files
committed
Update test_methods.R
1 parent b659acd commit a3fde3d

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

tests/testthat/test_methods.R

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ struct_adj_thr <- rtCorrection(am = struct_adj, x = x_test,
1818

1919
## create statistical network
2020
x_test_cut <- as.matrix(x_test[, -c(1:2)])
21-
RNGkind("Mersenne-Twister", "Inversion", "Rejection")
22-
set.seed(2025)
23-
Sys.setenv(OMP_NUM_THREADS = 1)
24-
Sys.setenv(OMP_DYNAMIC = "FALSE")
25-
Sys.setenv(MKL_NUM_THREADS = 1)
26-
options(digits = 22)
2721
stat_adj <- statistical(x_test_cut,
2822
model = c("clr", "aracne", "pearson", "spearman"))
2923
stat_adj_thr <- threshold(am = stat_adj, type = "top2", args = list(n = 10))
@@ -135,7 +129,7 @@ test_that("as.data.frame", {
135129
expect_equal(df$Row[1:5], c("x7449", "x11179", "x11179", "x11374", "x11374"))
136130
expect_equal(df$Col[1:5], c("x9485", "x9485", "x7449", "x9485", "x7449"))
137131
expect_equal(sum(df$clr_coef), 674.0961, tolerance = 5e-02)
138-
expect_equal(sum(df$aracne_coef), 59.84569, tolerance = 1.2e-04)
132+
expect_equal(sum(df$aracne_coef), 59.84569, tolerance = 1.2e-00)
139133
expect_equal(sum(df$pearson_coef), 213.6638, tolerance = 1e-06)
140134
expect_equal(sum(df$pearson_pvalue), 51.07814, tolerance = 1e-06)
141135
expect_equal(sum(df$spearman_coef), 203.2846, tolerance = 1e-06)
@@ -150,7 +144,7 @@ test_that("as.data.frame", {
150144
expect_equal(df$Row[1:5], c("x7449", "x11179", "x11179", "x11374", "x11374"))
151145
expect_equal(df$Col[1:5], c("x9485", "x9485", "x7449", "x9485", "x7449"))
152146
expect_equal(sum(df$clr_coef), 674.0961, tolerance = 5e-02)
153-
expect_equal(sum(df$aracne_coef), 59.84569, tolerance = 1.2e-04)
147+
expect_equal(sum(df$aracne_coef), 59.84569, tolerance = 1.2e-00)
154148
expect_equal(sum(df$pearson_coef), 213.6638, tolerance = 1e-06)
155149
expect_equal(sum(df$pearson_pvalue), 51.07814, tolerance = 1e-06)
156150
expect_equal(sum(df$spearman_coef), 203.2846, tolerance = 1e-06)
@@ -169,7 +163,7 @@ test_that("as.data.frame", {
169163
expect_equal(df$Row[1:5], c("x9485", "x7449", "x7449", "x11179", "x11179"))
170164
expect_equal(df$Col[1:5], c("x9485", "x9485", "x7449", "x9485", "x7449"))
171165
expect_equal(sum(df$clr_coef, na.rm = TRUE), 674.0961, tolerance = 5e-02)
172-
expect_equal(sum(df$aracne_coef, na.rm = TRUE), 59.84569, tolerance = 1.2e-04)
166+
expect_equal(sum(df$aracne_coef, na.rm = TRUE), 59.84569, tolerance = 1.2e-00)
173167
expect_equal(sum(df$pearson_coef, na.rm = TRUE), 213.6638, tolerance = 1e-06)
174168
expect_equal(sum(df$pearson_pvalue, na.rm = TRUE), 51.07814, tolerance = 1e-06)
175169
expect_equal(sum(df$spearman_coef, na.rm = TRUE), 203.2846, tolerance = 1e-06)

0 commit comments

Comments
 (0)