|
a |
|
b/inst/tests/test-downloadAndProcessGEO.R |
|
|
1 |
context("Download and process all DLBCL datasets") |
|
|
2 |
|
|
|
3 |
|
|
|
4 |
data(DLBCL_overview) |
|
|
5 |
deep_test <- FALSE # Do extensive testing --- SLOW! |
|
|
6 |
|
|
|
7 |
if (deep_test) { # deep_test is defined in ./test-all.R |
|
|
8 |
exclude <- character(0) |
|
|
9 |
for (geo_nbr in setdiff(DLBCL_overview$GSE, exclude)) { |
|
|
10 |
|
|
|
11 |
cat("\n\n\n\n\n\n\n\n #### ", geo_nbr, " #### \n\n\n\n") |
|
|
12 |
|
|
|
13 |
res <- downloadAndProcessGEO(geo_nbr = geo_nbr, |
|
|
14 |
cdf = "brainarray", |
|
|
15 |
target = "ensg", |
|
|
16 |
clean = FALSE) |
|
|
17 |
|
|
|
18 |
cat("\n", geo_nbr, "downloaded and preprocessed successfully!\n") |
|
|
19 |
|
|
|
20 |
test_that(paste("downloadAndProcessGEO works for", geo_nbr), { |
|
|
21 |
expect_that(res, is_a("list")) |
|
|
22 |
expect_that(names(res), equals(c("es", "metadata", "call"))) |
|
|
23 |
expect_that(res$es, is_a("list")) |
|
|
24 |
expect_that(res$metadata, is_a(geo_nbr)) |
|
|
25 |
expect_that(res$metadata, is_a("data.frame")) |
|
|
26 |
expect_that(res$call, is_a("call")) |
|
|
27 |
|
|
|
28 |
# All expression values should not be na |
|
|
29 |
expect_that(all(sapply(res$es, inherits, "ExpressionSet")), is_true()) |
|
|
30 |
expect_that(any(sapply(res$es, function(x) anyNA(exprs(x)))), is_false()) |
|
|
31 |
}) |
|
|
32 |
} |
|
|
33 |
} |
|
|
34 |
|
|
|
35 |
# GSE19246 downloaded and preprocessed successfully! |
|
|
36 |
# GSE12195 downloaded and preprocessed successfully! |
|
|
37 |
# GSE22895 downloaded and preprocessed successfully! |
|
|
38 |
# GSE31312 downloaded and preprocessed successfully! |
|
|
39 |
# GSE10846 downloaded and preprocessed successfully! |
|
|
40 |
# GSE34171 downloaded and preprocessed successfully! |
|
|
41 |
# GSE22470 downloaded and preprocessed successfully! |
|
|
42 |
# GSE4475 downloaded and preprocessed successfully! |
|
|
43 |
# GSE11318 downloaded and preprocessed successfully! |