Skip to content

Commit eafadff

Browse files
committed
Merge branch 'devel' into large_scale
2 parents e72e1c2 + d3e8acf commit eafadff

File tree

7 files changed

+27
-14
lines changed

7 files changed

+27
-14
lines changed

Diff for: .github/workflows/check-bioc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ jobs:
222222
rcmdcheck::rcmdcheck(
223223
args = c("--no-build-vignettes", "--no-manual", "--timings"),
224224
build_args = c("--no-manual", "--no-resave-data"),
225-
error_on = "warning",
225+
error_on = "error",
226226
check_dir = "check"
227227
)
228228
shell: Rscript {0}

Diff for: DESCRIPTION

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: xcms
2-
Version: 4.3.4
2+
Version: 4.5.1
33
Title: LC-MS and GC-MS Data Analysis
44
Description: Framework for processing and visualization of chromatographically
55
separated and single-spectra mass spectral data. Imports from AIA/ANDI NetCDF,
@@ -162,4 +162,4 @@ Collate:
162162
'writemzdata.R'
163163
'writemztab.R'
164164
'xcmsSource.R'
165-
'zzz.R'
165+
'zzz.R'

Diff for: NEWS.md

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# xcms 4.3
1+
# xcms 4.5
22

33
## Changes in version XXX
44

@@ -7,7 +7,7 @@
77
in MS level 1 or `"CP2001"` instead of `"CP001"` for a chromatographic peak
88
in MS level 2.
99

10-
## Changes in version 4.3.4
10+
## Changes in version 4.5.1
1111

1212
- Address issue #765: peak detection on chromatographic data: report a
1313
chromatogram's `"mz"`, `"mzmin"` and `"mzmax"` as the mean m/z and lower and
@@ -18,6 +18,14 @@
1818
- Add `chromPeakSummary` generic (issue #705).
1919
- Add `chromPeakSummary()` method to calculate the *beta* quality metrics.
2020

21+
# xcms 4.3
22+
23+
## Changes in version 4.3.4
24+
25+
- Small update to the `matchLamaChromPeaks()` function to get the chromPeaksId
26+
of the chromPeaks matched with Lamas.
27+
- Small fix to the .yml file for the github actions, so they do not crash on
28+
warnings.
2129

2230
## Changes in version 4.3.3
2331

@@ -1325,4 +1333,4 @@ Other Changes since Version 1.14:
13251333

13261334
- xcmsRaw can now filter for positive/negative spectra,
13271335
if the file includes both polarities. xcmsSet() can pass
1328-
the polarity to contain positive/negative peaks only.
1336+
the polarity to contain positive/negative peaks only.

Diff for: R/AllGenerics.R

-1
Original file line numberDiff line numberDiff line change
@@ -2114,7 +2114,6 @@ setGeneric("stitch", function(object, lockMass, ...) standardGeneric("stitch"))
21142114
setGeneric("stitch.xml", function(object, lockMass) standardGeneric("stitch.xml"))
21152115
setGeneric("stitch.netCDF", function(object, lockMass) standardGeneric("stitch.netCDF"))
21162116
setGeneric("stitch.netCDF.new", function(object, lockMass) standardGeneric("stitch.netCDF.new"))
2117-
21182117
setGeneric("subset<-", function(object, value) standardGeneric("subset<-"))
21192118
setGeneric("subsetAdjust", function(object, ...) standardGeneric("subsetAdjust"))
21202119
setGeneric("subsetAdjust<-", function(object, value) standardGeneric("subsetAdjust<-"))

Diff for: R/XcmsExperiment.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1414,7 +1414,7 @@ setMethod(
14141414
rt_adj <- bpmapply(rtMap, rt_raw, idx, FUN = function(x, y, i, param) {
14151415
if (nrow(x) >= 10) { # too strict ? Gam always throws error when less than that and loess does not work that well either.
14161416
.adjust_rt_model(y, method = param@method,
1417-
rt_map = x, span = param@span,
1417+
rt_map = x[, c("ref","obs")], span = param@span,
14181418
resid_ratio = param@outlierTolerance,
14191419
zero_weight = param@zeroWeight,
14201420
bs = param@bs)

Diff for: R/do_adjustRtime-functions.R

+5-2
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,9 @@ NULL
788788
#'
789789
#' @return a `data.frame` with columns `"ref"` and `"obs"` with the retention
790790
#' times of the pairs of matched peaks. This `data.frame` can be used
791-
#' in `.adjust_rt_model`'s parameter `rt_raw`.
791+
#' in `.adjust_rt_model`'s parameter `rt_raw`. The column `chromPeaksId`
792+
#' contains the rownames of the `obs_peaks` matrix. This can be used to
793+
#' identify the peaks that were matched.
792794
#'
793795
#' @author Johannes Rainer, Philippine Louail
794796
#'
@@ -804,7 +806,8 @@ NULL
804806
dups <- idx[duplicated(idx[, 2L]), 2L]
805807
idx <- idx[!idx[, 2L] %in% dups, , drop = FALSE]
806808
data.frame(ref = ref_anchors[idx[, 2L], 2L],
807-
obs = obs_peaks[idx[, 1L], 2L])
809+
obs = obs_peaks[idx[, 1L], 2L],
810+
chromPeaksId = rownames(obs_peaks[idx[, 1L], ,drop = FALSE]))
808811
}
809812

810813
#' @description

Diff for: tests/testthat/test_do_adjustRtime-functions.R

+7-4
Original file line numberDiff line numberDiff line change
@@ -293,13 +293,16 @@ test_that(".match_reference_anchors works", {
293293
rt = c(100, 150.1, 190, 190, 190, 192))
294294
b <- cbind(mz = c(200.2, 232, 233.1, 234),
295295
rt = c(150, 190.4, 193, 240))
296+
rownames(a) <- rep("a", nrow(a))
297+
rownames(b) <- rep("b", nrow(b))
296298

297299
res <- .match_reference_anchors(a, b)
298300
expect_true(is.data.frame(res))
299-
expect_equal(colnames(res), c("ref", "obs"))
301+
expect_equal(colnames(res), c("ref", "obs", "chromPeaksId"))
300302
expect_true(nrow(res) == 1L)
301303
expect_equal(res$ref, 193.0)
302304
expect_equal(res$obs, 190.0)
305+
expect_equal(res$chromPeaksId, "a")
303306

304307
## no matches:
305308
res <- .match_reference_anchors(a, b, tolerance = 0, toleranceRt = 0)
@@ -311,7 +314,7 @@ test_that(".match_reference_anchors works", {
311314
## rows 5 and 6 from `a` match row 3 from `b`
312315
res <- .match_reference_anchors(a, b, tolerance = 0.1, toleranceRt = 52)
313316
expect_true(is.data.frame(res))
314-
expect_equal(colnames(res), c("ref", "obs"))
317+
expect_equal(colnames(res),c("ref", "obs", "chromPeaksId"))
315318
expect_equal(res$ref, 190.4)
316319
expect_equal(res$obs, 190.0)
317320

@@ -320,15 +323,15 @@ test_that(".match_reference_anchors works", {
320323
## `b` and should thus not be reported.
321324
res <- .match_reference_anchors(a, b, tolerance = 0.1, toleranceRt = 5)
322325
expect_true(is.data.frame(res))
323-
expect_equal(colnames(res), c("ref", "obs"))
326+
expect_equal(colnames(res), c("ref", "obs", "chromPeaksId"))
324327
expect_equal(res$ref, c(150, 190.4))
325328
expect_equal(res$obs, c(150.1, 190.0))
326329

327330
## Same but reducing toleranceRt to have also a match between row 6 in `a`
328331
## with row 3 in `b`.
329332
res <- .match_reference_anchors(a, b, tolerance = 0.1, toleranceRt = 2)
330333
expect_true(is.data.frame(res))
331-
expect_equal(colnames(res), c("ref", "obs"))
334+
expect_equal(colnames(res), c("ref", "obs", "chromPeaksId"))
332335
expect_equal(res$ref, c(150, 190.4, 193.0))
333336
expect_equal(res$obs, c(150.1, 190.0, 192.0))
334337
})

0 commit comments

Comments
 (0)