CRAN Package Check Results for Maintainer ‘Paolo Inglese <p.inglese at outlook.com>’

Last updated on 2024-05-29 08:56:58 CEST.

Package ERROR OK
SPUTNIK 1 12

Package SPUTNIK

Current CRAN status: ERROR: 1, OK: 12

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