Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ReadSpecClipboard
extended to work also with connections (to facili…
…tate testing on non windows platforms). Snapshot testing for main function `InterpretMSSpectrum` implemented.
- Loading branch information
Showing
5 changed files
with
36 additions
and
8 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,10 @@ | ||
# InterpretMSSpectrum works | ||
|
||
Code | ||
InterpretMSSpectrum::InterpretMSSpectrum(spec = inp, correct_peak = cp, met_db = mdb, | ||
formula_db = fdb, silent = FALSE) | ||
Warning <simpleWarning> | ||
[RemoveEmptyFragments] No Fragments left after step GetRdisopResult | ||
no non-missing arguments to max; returning -Inf | ||
[RemoveEmptyFragments] No Fragments left after step RemoveByScore | ||
|
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,10 @@ | ||
testthat::test_that( | ||
desc = "ReadSpecClipboard works as expected", | ||
code = { | ||
fn <- tempfile(fileext = ".txt") | ||
x <- as.matrix(InterpretMSSpectrum::apci_spectrum) | ||
rownames(x) <- 1:nrow(x) | ||
write.table(x = x, file = fn, row.names = FALSE) | ||
testthat::expect_equal(InterpretMSSpectrum::ReadSpecClipboard(con = fn), x) | ||
} | ||
) |