forked from loosolab/wilson
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed more style mistakes, added try/catch warning handling
- Loading branch information
1 parent
6111a8a
commit 961742d
Showing
2 changed files
with
24 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
context("MaxQuant parser") | ||
|
||
testthat::test_that("all needed input parameteres are given", { | ||
expect_error(wilson::parse_MaxQuant(),"The proteinGroups file was not given") | ||
expect_error(wilson::parse_MaxQuant(proteinGroups_in = "/path/path/"),"The summary file was not given") | ||
expect_error(wilson::parse_MaxQuant(proteinGroups_in = "/path/path/",summary_in = "/path/path/"), | ||
test_that("all needed input parameteres are given", { | ||
expect_error(wilson::parse_MaxQuant(), "The proteinGroups file was not given") | ||
expect_error(wilson::parse_MaxQuant(proteinGroups_in = "./path/path/"), "The summary file was not given") | ||
expect_error(wilson::parse_MaxQuant(proteinGroups_in = "./path/path/", summary_in = "./path/path/"), | ||
"The output file was not given") | ||
expect_error(wilson::parse_MaxQuant(proteinGroups_in = "/path/path/",summary_in = "/path/path/", | ||
outfile = "/path/path/"),"The output_reduced file was not given") | ||
expect_error(wilson::parse_MaxQuant(proteinGroups_in = "./path/path/", summary_in = "./path/path/", | ||
outfile = "./path/path/"), "The output_reduced file was not given") | ||
}) | ||
|
||
testthat::test_that("mq_parser",{ | ||
test_that("mq_parser", { | ||
|
||
expect_error(wilson::parse_MaxQuant(proteinGroups_in = system.file("/tests/testthat", "proteinGroups_test.txt", package = "wilson"), | ||
summary_in = system.file("/tests/testthat", "summary_test_2.txt", package = "wilson"), | ||
expect_error(wilson::parse_MaxQuant(proteinGroups_in = "proteinGroups_test.txt", | ||
summary_in = "summary_test_2.txt", | ||
outfile = "./out", outfile_reduced = "./outres" ), | ||
"wrong format on summary file: column \'Experiment\' misssing") | ||
expect_true(wilson::parse_MaxQuant(proteinGroups_in = system.file("/tests/testthat", "proteinGroups_test.txt", package = "wilson"), | ||
summary_in = system.file("/tests/testthat", "summary_test.txt", package = "wilson"), | ||
outfile = "./out", outfile_reduced = "./outres", config = system.file("/tests/testthat", "success_config.json", package = "wilson"))) | ||
expect_error(wilson::parse_MaxQuant(proteinGroups_in = system.file("/tests/testthat", "proteinGroups_test.txt", package = "wilson"), | ||
summary_in = system.file("/tests/testthat", "summary_test.txt", package = "wilson"), | ||
expect_true(wilson::parse_MaxQuant(proteinGroups_in = "proteinGroups_test.txt", | ||
summary_in = "summary_test.txt", | ||
outfile = "./out", outfile_reduced = "./outres", config = "success_config.json")) | ||
expect_error(wilson::parse_MaxQuant(proteinGroups_in = "proteinGroups_test.txt", | ||
summary_in = "summary_test.txt", | ||
outfile = "./out", outfile_reduced = "./outres", config = "" ), | ||
"Could not read config file") | ||
expect_error(wilson::parse_MaxQuant(proteinGroups_in = system.file("/tests/testthat", "proteinGroups_test.txt", package = "wilson"), | ||
summary_in = system.file("/tests/testthat", "summary_test.txt", package = "wilson"), | ||
outfile = "./out", outfile_reduced = "./outres", config = system.file("/tests/testthat", "fail_config.json", package = "wilson") ), | ||
expect_error(wilson::parse_MaxQuant(proteinGroups_in = "proteinGroups_test.txt", | ||
summary_in = "summary_test.txt", | ||
outfile = "./out", outfile_reduced = "./outres", config = "fail_config.json" ), | ||
"reduced_list is missing in config file") | ||
}) |