Skip to content

Commit

Permalink
Fix tests and renaming runMetFamily() messed up by bad git merge
Browse files Browse the repository at this point in the history
  • Loading branch information
sneumann committed Feb 27, 2024
1 parent 5a7defb commit 5348757
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 71 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ biocViews: Software, Visualization
Collate:
'Annotation.R'
'Classifiers.R'
'StartApp.R'
'runMetFamily.R'
'R_packages.R'
'FragmentMatrixFunctions.R'
'DataProcessing.R'
Expand Down
44 changes: 0 additions & 44 deletions man/parsePeakAbundanceMatrix.Rd

This file was deleted.

17 changes: 0 additions & 17 deletions man/runMetFamily.Rd

This file was deleted.

22 changes: 13 additions & 9 deletions tests/testthat/test_fileinput.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,19 @@ test_that("trivial", {
})

test_that("exampledata", {
# filePeakMatrix <- system.file("data/showcase/Metabolite_profile_showcase.txt", package = "MetFamily")
# data <- parsePeakAbundanceMatrix(filePeakMatrix, doPrecursorDeisotoping,
# mzDeviationInPPM_precursorDeisotoping, mzDeviationAbsolute_precursorDeisotoping,
# maximumRtDifference,
# progress=FALSE)
#
# expect_equal(nrow(data), 17)
# expect_equal(ncol(data), 34)
#
filePeakMatrix <- system.file("data/showcase/Metabolite_profile_showcase.txt", package = "MetFamily")
data <- parsePeakAbundanceMatrix(filePeakMatrix, doPrecursorDeisotoping=TRUE,
mzDeviationInPPM_precursorDeisotoping=10, mzDeviationAbsolute_precursorDeisotoping=0.01,
maximumRtDifference=0.05,
progress=FALSE)

## Test dimensions
expect_equal(nrow(data$dataFrame1), 5403)
expect_equal(ncol(data$dataFrame1), 20)

## Test some values
expect_true(all(summary(t(data$dataFrame1[1,c("TRI03", "TRI02", "TRI01", "LVS03", "LVS02", "LVS01")])) == c("Min. : 236.0 ", "1st Qu.: 306.2 ", "Median : 357.5 ", "Mean : 501.0 ", "3rd Qu.: 554.2 ", "Max. :1146.0 ")))
expect_true(all(round(summary(data$dataFrame1[, "TRI01"])) == c(0, 809, 1537, 9818, 3207, 4407926)))
})

test_that("MS-Dial 4.X", {
Expand Down

0 comments on commit 5348757

Please # to comment.