Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/devel' into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
jorainer committed Feb 23, 2024
2 parents e606322 + 4fcb331 commit de0b366
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
6 changes: 5 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ Authors@R: c(
person(given = "Philippine", family = "Louail",
email = "philippine.louail@eurac.edu",
role = "aut",
comment = c(ORCID = "0009-0007-5429-6846"))
comment = c(ORCID = "0009-0007-5429-6846")),
person(given = "Pablo", family = "Vangeenderhuysen",
email = "pablo.vangeenderhuysen@ugent.be",
role = "ctb",
comment = c(ORCID = "0000-0002-5492-6904"))
)
Depends:
R (>= 4.0.0),
Expand Down
2 changes: 1 addition & 1 deletion R/XcmsExperiment.R
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@
NULL

.empty_chrom_peaks <- function(sample = TRUE) {
cols <- c(.REQ_PEAKS_COLS, "maxo")
cols <- c(.REQ_PEAKS_COLS, "maxo","sn")
if (!sample)
cols <- cols[cols != "sample"]
matrix(numeric(), ncol = length(cols), nrow = 0,
Expand Down
8 changes: 7 additions & 1 deletion inst/NEWS
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
Changes in version 4.1.8
Changes in version 4.1.9
----------------------

- Fix bug in `filterFeatures,PercentMissingFilter`.

Changes in version 4.1.8
----------------------

- Fixing issue #716: edit of `.empty_chrom_peaks` function so an `sn` column is
returned. Fixes extracting and plotting of peaks after using `manualChromPeaks`

Changes in version 4.1.7
----------------------

Expand Down
7 changes: 6 additions & 1 deletion tests/testthat/test_XcmsExperiment.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mse_dia <- readMsExperiment(fl)
test_that(".empty_chrom_peaks works", {
res <- .empty_chrom_peaks()
expect_true(nrow(res) == 0)
expect_equal(colnames(res), c(.REQ_PEAKS_COLS, "maxo"))
expect_equal(colnames(res), c(.REQ_PEAKS_COLS, "maxo","sn"))

res <- .empty_chrom_peaks(sample = FALSE)
expect_true(nrow(res) == 0)
Expand Down Expand Up @@ -995,8 +995,13 @@ test_that("manualChromPeaks,XcmsExperiment works", {
expect_equal(unname(pks[, c("mz", "into", "maxo")]),
unname(pks_2[, c("mz", "into", "maxo")]))

chr_pks <- chromPeaks(res)
expect_true("sn" %in% colnames(chr_pks))

res2 <- manualChromPeaks(tmp, pks, samples = 2)
expect_equal(unname(chromPeaks(res2)), unname(pks_2))


})

test_that("filterChromPeaks,XcmsExperiment works", {
Expand Down

0 comments on commit de0b366

Please sign in to comment.