Last updated on 2024-05-30 01:56:01 CEST.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 1.4.2 | 14.16 | 388.98 | 403.14 | OK | |
r-devel-linux-x86_64-debian-gcc | 1.4.2 | 12.83 | 274.15 | 286.98 | OK | |
r-devel-linux-x86_64-fedora-clang | 1.4.2 | 517.02 | OK | |||
r-devel-linux-x86_64-fedora-gcc | 1.4.2 | 478.28 | OK | |||
r-devel-windows-x86_64 | 1.4.2 | 16.00 | 365.00 | 381.00 | OK | |
r-patched-linux-x86_64 | 1.4.2 | 20.97 | 356.94 | 377.91 | OK | |
r-release-linux-x86_64 | 1.4.2 | 9.96 | 362.27 | 372.23 | OK | |
r-release-macos-arm64 | 1.4.2 | 183.00 | OK | |||
r-release-macos-x86_64 | 1.4.2 | 423.00 | OK | |||
r-release-windows-x86_64 | 1.4.2 | 16.00 | 373.00 | 389.00 | OK | |
r-oldrel-macos-arm64 | 1.4.2 | 173.00 | OK | |||
r-oldrel-macos-x86_64 | 1.4.2 | 407.00 | OK | |||
r-oldrel-windows-x86_64 | 1.4.2 | 19.00 | 440.00 | 459.00 | ERROR |
Version: 1.4.2
Check: tests
Result: ERROR
Running 'test_constructors.R' [8s]
Running 'test_ext_data.R' [16s]
Running 'test_global_ref_filter.R' [115s]
Running 'test_pixel_count_filter.R' [155s]
Running the tests in 'tests/test_pixel_count_filter.R' failed.
Complete output:
> # Test pixel count filter
>
> library(testthat)
> library(SPUTNIK)
>
> test_that("pixel count filter", {
+ MIN_NUM_PIXELS <- 9
+
+ x <- bladderMALDIRompp2010(verbose = TRUE)
+ mz <- attr(x, "mass")
+ shape <- attr(x, "size")
+
+ msX <- msiDataset(values = x, mz = mz, rsize = shape[1], csize = shape[2])
+ msX <- normIntensity(msX, "PQN")
+ msX <- varTransform(msX, "log2")
+
+ refImg <- refImageContinuous(msX, method = "sum")
+ roiImg <- refImageBinaryOtsu(refImg)
+
+ cpfAggr0 <- countPixelsFilter(
+ msiData = msX, roiImage = roiImg,
+ minNumPixels = MIN_NUM_PIXELS, aggressive = 0
+ )
+ cpfAggr1 <- countPixelsFilter(
+ msiData = msX, roiImage = roiImg,
+ minNumPixels = MIN_NUM_PIXELS, aggressive = 1
+ )
+ cpfAggr2 <- countPixelsFilter(
+ msiData = msX, roiImage = roiImg,
+ minNumPixels = MIN_NUM_PIXELS, aggressive = 2
+ )
+ expect_is(cpfAggr0, "list")
+ expect_equal(attr(cpfAggr0, "peak.filter"), T)
+ expect_equal(attr(cpfAggr0, "filter"), "countPixels")
+ expect_is(cpfAggr1, "list")
+ expect_equal(attr(cpfAggr1, "peak.filter"), T)
+ expect_equal(attr(cpfAggr1, "filter"), "countPixels")
+ expect_is(cpfAggr2, "list")
+ expect_equal(attr(cpfAggr2, "peak.filter"), T)
+ expect_equal(attr(cpfAggr2, "filter"), "countPixels")
+
+ # Number of selected peaks must be: numAggressive0 >= numAggressive1 >=
+ # numAggressive >= 2
+ expect_true((length(cpfAggr0$sel.peaks) >= length(cpfAggr1$sel.peaks)) &&
+ (length(cpfAggr0$sel.peaks) >= length(cpfAggr2$sel.peaks)) &&
+ (length(cpfAggr1$sel.peaks) >= length(cpfAggr2$sel.peaks)))
+ expect_equal(length(cpfAggr0$sel.peaks), 174)
+ expect_equal(length(cpfAggr1$sel.peaks), 152)
+ expect_equal(length(cpfAggr2$sel.peaks), 86)
+ })
Downloading the data from the repository...
trying URL 'https://raw.github.com/paoloinglese/SPUTNIKexamples/master/data/maldiData.rda'
Content type 'application/octet-stream' length 6306944 bytes (6.0 MB)
==================================================
downloaded 6.0 MB
Loading the data in the R environment...
Creating msiDataset object...
Detecting constant peaks...
Generating image of detected peaks...
Generating total-ion-count image...
Counting connected pixels within signal region...
Counting connected pixels within signal region...
Counting connected pixels within signal region...
── Failure: pixel count filter ─────────────────────────────────────────────────
length(cpfAggr0$sel.peaks) not equal to 174.
1/1 mismatches
[1] 173 - 174 == -1
Error:
! Test failed
Backtrace:
▆
1. ├─testthat::test_that(...)
2. │ └─withr (local) `<fn>`()
3. └─reporter$stop_if_needed()
4. └─rlang::abort("Test failed", call = NULL)
Execution halted
Flavor: r-oldrel-windows-x86_64