inst/unitTests/test_isolationWindow.R
fdd95c08
 test_isolationWindow <- function() {
     library("msdata")
d05a987e
     f <- msdata::proteomics(full.names = TRUE,
                             pattern = "TMT_Erwinia_1uLSike_Top10HCD_isol2_45stepped_60min_01.mzML.gz")
fdd95c08
     rw2 <- openMSfile(f, backend = "pwiz")
     i1 <- isolationWindow(f)
     i3 <- isolationWindow(rw2)
     checkEquals(i1, i3)
     i1 <- isolationWindow(f, unique = FALSE)
     i3 <- isolationWindow(rw2, unique = FALSE)
     checkEquals(i1, i3)
     i1 <- isolationWindow(c(f, f), unique = FALSE)
     checkEquals(length(i1), 2L)
     checkEquals(i1[[1]], i1[[2]])
e3f79ff5
     hd <- header(rw2)
fdd95c08
     checkEquals(sum(hd$msLevel == 2), nrow(i1[[1]]))
 }