Last updated on 2025-02-16 09:51:16 CET.
Package | ERROR | NOTE | OK |
---|---|---|---|
SPUTNIK | 1 | 3 | 11 |
Current CRAN status: ERROR: 1, NOTE: 3, OK: 11
Version: 1.4.2
Check: Rd cross-references
Result: NOTE
Found the following Rd file(s) with Rd \link{} targets missing package
anchors:
plot.Rd: viridis
Please provide package anchors for all Rd \link{} targets not in the
package itself and the base packages.
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-windows-x86_64
Version: 1.4.2
Check: tests
Result: ERROR
Running ‘test_constructors.R’ [6s/8s]
Running ‘test_ext_data.R’ [13s/21s]
Running ‘test_global_ref_filter.R’ [67s/84s]
Running ‘test_pixel_count_filter.R’ [85s/105s]
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-patched-linux-x86_64