Skip to content

Commit f79fa7b

Browse files
committed
cmp freestyle
1 parent af538c7 commit f79fa7b

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

DESCRIPTION

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ Version: 0.0.1
55
Authors@R: c(person(given = "Christian", family = "Panse", email = "cp@fgcz.ethz.ch", role = c("aut", "cre"),
66
comment = c(ORCID = "0000-0003-1975-3064")),
77
person(given = "Tobias", family = "Kockmann", email = "Tobias.Kockmann@fgcz.ethz.ch", role = "aut"))
8-
Depends: R (>= 4.0),
9-
methods,
8+
Depends: R (>= 4.0)
109
Imports:
1110
Suggests:
1211
protViz (>= 0.6),

tests/testthat/test-spectrum.R

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ library(rawR)
88
sum(c("scan", "scanType", "rtinseconds", "pepmass", "charge", "mZ", "intensity") %in% names(x))>6
99
}
1010

11-
test_that("check readSpectrum function.", {
11+
test_that("check readSpectrum function names.", {
1212

1313
rawfile <- file.path(path.package(package = 'rawR'), 'extdata', 'sample.raw')
1414

@@ -17,3 +17,15 @@ test_that("check readSpectrum function.", {
1717
lapply(S, function(x){expect_true(.is.peaklist(x))})
1818

1919
})
20+
21+
test_that("check readSpectrum 23.", {
22+
23+
rawfile <- file.path(path.package(package = 'rawR'), 'extdata', 'sample.raw')
24+
S <- readSpectrum(rawfile, 23)[[1]]
25+
26+
DF <- read.table(file.path(path.package(package = 'rawR'), 'extdata', 'scan23_peakList.txt'), sep="\t", header=TRUE)
27+
28+
expect_true(sum(S$mZ %in% DF$m.z) >= 720)
29+
expect_true(sum(S$intensity %in% DF$Intensity) >= 720)
30+
})
31+

0 commit comments

Comments
 (0)