-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add argument stopOnError to xcmsSet function
o Add argument stopOnError to xcmsSet to enable feature detection in all provided files without stopping on errors. This relates to issue #55. o Add related documentation.
- Loading branch information
Showing
5 changed files
with
134 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
############################################################ | ||
## Unit tests related to stopIfNot parameters (translated to | ||
## into the stop.if.not BPPARAM argument. | ||
|
||
dontrun_test_xcmsSet_stopIfNot <- function() { | ||
|
||
## Run the feature detection using xcmsSet in parallel mode | ||
## and evaluate the stopOnError parameter | ||
## We need some problematic test files here; we're using the ones | ||
## from issue #55 | ||
|
||
mzfs <- paste0("../../local_data/mzML-files/", | ||
c("123.mzML", "261.mzML", "263.mzML")) | ||
|
||
## Default: stops on the first encountered error. | ||
checkException(xcmsSet(mzfs, method = "centWave", ppm = 2.5, | ||
peakwidth = c(2.5, 9), mzdiff = -0.001, | ||
snthresh = 10, stopOnError = TRUE)) | ||
suppressWarnings( | ||
res <- xcmsSet(mzfs, method = "centWave", ppm = 2.5, | ||
peakwidth = c(2.5, 9), mzdiff = -0.001, | ||
snthresh = 10, stopOnError = FALSE) | ||
) | ||
checkTrue(all(res@peaks[, "sample"] == 1)) | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters