tests/testthat/test_matchpeaks.R

test_that("matchpeaks doesn't fail", {
    faahko_file <- system.file('cdf/KO/ko15.CDF', package = "faahKO")

    faahko_xs <- xcmsSet(faahko_file, profparam = list(step = 0),
                         method = "centWave", noise = 10000, snthresh = 40,
                         prefilter = c(6, 10000))
    pks <- peaks(faahko_xs)

    calibs <- pks[c(3, 5, 7, 13, 17, 29), "mz"]

    res <- xcms:::matchpeaks(pks, calibs)
    res_2 <- xcms:::matchpeaks(pks[order(pks[, "mz"]), ], calibs)
})

Try the xcms package in your browser

Any scripts or data that you put into this service are public.

xcms documentation built on Nov. 8, 2020, 5:13 p.m.