... | ... |
@@ -1,6 +1,8 @@ |
1 | 1 |
CHANGES IN VERSION 2.15.1 |
2 | 2 |
------------------------- |
3 |
- o Fix type (see https://github.com/sneumann/mzR/pull/162) |
|
3 |
+ o Fix typo (see https://github.com/sneumann/mzR/pull/162) |
|
4 |
+ o New .hasSpectra private function (see |
|
5 |
+ https://github.com/lgatto/MSnbase/issues/343) |
|
4 | 6 |
|
5 | 7 |
CHANGES IN VERSION 2.15.0 |
6 | 8 |
------------------------- |
... | ... |
@@ -40,3 +40,11 @@ setMethod("isolationWindow", "character", |
40 | 40 |
x <- lapply(x, base::unique) |
41 | 41 |
any(sapply(x, function(xx) nrow(xx) > 1)) |
42 | 42 |
} |
43 |
+ |
|
44 |
+ |
|
45 |
+.hasSpectra <- function(x) { |
|
46 |
+ if (is.character(x) & file.exists(x)) |
|
47 |
+ x <- mzR::openMSfile(x) |
|
48 |
+ stopifnot(inherits(x, "mzR")) |
|
49 |
+ return(as.logical(length(x))) |
|
50 |
+} |