Skip to content

Commit

Permalink
Do not test with MHCnuggets locally, due to unsuppressable output, un…
Browse files Browse the repository at this point in the history
  • Loading branch information
richelbilderbeek committed Sep 2, 2020
1 parent 08f10ff commit 3501350
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 55 deletions.
2 changes: 1 addition & 1 deletion R/predict_counts.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ predict_counts <- function(
peptide_length,
percentile,
verbose = FALSE,
ic50_prediction_tool = "mhcnuggetsr"
ic50_prediction_tool
) {
testthat::expect_equal(length(protein_sequence), 1)
empty_tibble <- tibble::tibble(
Expand Down
2 changes: 1 addition & 1 deletion R/predict_counts_per_proteome.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ predict_counts_per_proteome <- function(
peptide_length,
percentile,
verbose = FALSE,
ic50_prediction_tool = "mhcnuggetsr"
ic50_prediction_tool
) {
tibbles <- list()
for (i in seq_along(protein_sequences)) {
Expand Down
2 changes: 1 addition & 1 deletion R/predict_n_coincidence_tmh_peptide.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ predict_n_coincidence_tmh_peptide <- function(# nolint indeed a long function na
protein_sequence,
peptide_length,
verbose = FALSE,
ic50_prediction_tool = "mhcnuggetsr"
ic50_prediction_tool
) {
bbbq::predict_counts(
protein_sequence = protein_sequence,
Expand Down
2 changes: 1 addition & 1 deletion man/predict_counts.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/predict_counts_per_proteome.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/predict_n_coincidence_tmh_peptide.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/testthat/test-get_ic50_threshold.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test_that("mhcnuggets", {

if (!pureseqtmr::is_on_travis()) return()
if (!mhcnuggetsr::is_mhcnuggets_installed()) return()

expect_silent(
Expand Down
52 changes: 9 additions & 43 deletions tests/testthat/test-predict_counts.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
test_that("MHCNuggets, MHC-I, peptide length 9", {
if (!pureseqtmr::is_on_travis()) return()
if (!pureseqtmr::is_pureseqtm_installed()) return()
if (!mhcnuggetsr::is_mhcnuggets_installed()) return()

Expand All @@ -9,7 +10,8 @@ test_that("MHCNuggets, MHC-I, peptide length 9", {
protein_sequence = protein_sequence,
haplotype = get_mhc1_haplotypes()[1],
peptide_length = 9,
percentile = 0.05
percentile = 0.05,
ic50_prediction_tool = "mhcnuggetsr"
)
# Results from verbose output:
# Table: peptide length: 75, epitope length: 9, n fragments: 67,
Expand All @@ -29,6 +31,7 @@ test_that("MHCNuggets, MHC-I, peptide length 9", {
})

test_that("MHCNuggets, MHC-I, peptide length 10", {
if (!pureseqtmr::is_on_travis()) return()
if (!pureseqtmr::is_pureseqtm_installed()) return()
if (!mhcnuggetsr::is_mhcnuggets_installed()) return()

Expand All @@ -39,7 +42,8 @@ test_that("MHCNuggets, MHC-I, peptide length 10", {
protein_sequence = protein_sequence,
haplotype = get_mhc1_haplotypes()[1],
peptide_length = 10,
percentile = 0.05
percentile = 0.05,
ic50_prediction_tool = "mhcnuggetsr"
)
# Results from verbose output:
# Table: peptide length: 75, epitope length: 9, n fragments: 67,
Expand All @@ -59,6 +63,7 @@ test_that("MHCNuggets, MHC-I, peptide length 10", {
})

test_that("MHCNuggets, MHC-II, peptide length 13", {
if (!pureseqtmr::is_on_travis()) return()
if (!pureseqtmr::is_pureseqtm_installed()) return()
if (!mhcnuggetsr::is_mhcnuggets_installed()) return()

Expand All @@ -69,7 +74,8 @@ test_that("MHCNuggets, MHC-II, peptide length 13", {
protein_sequence = protein_sequence,
haplotype = get_mhc2_haplotypes()[1],
peptide_length = 13,
percentile = 0.05
percentile = 0.05,
ic50_prediction_tool = "mhcnuggetsr"
)
# Results from verbose output:
# Table: peptide length: 75, epitope length: 9, n fragments: 67,
Expand Down Expand Up @@ -148,43 +154,3 @@ test_that("use, NetMHC2pan, MHC-II, peptide length 13", {
expect_equal(63, t$n_spots)
expect_equal(46, t$n_spots_tmh)
})


test_that("profiling", {
if (!pureseqtmr::is_pureseqtm_installed()) return()
if (!mhcnuggetsr::is_mhcnuggets_installed()) return()
if (!netmhc2pan::is_netmhc2pan_installed()) return()
return()

peptide <- "MYSFVSEETGTLIVNSVLLFLAFVVFLLVTLAILTALRLCAYCCNIVNVSLVKPSFYVYSRVKNLNSSRVPDLLV" # nolint indeed long
profvis::profvis({
predict_counts(
protein_sequence = protein_sequence,
haplotype = get_mhc1_haplotypes()[1],
peptide_length = 10,
percentile = 0.05
)
predict_counts(
protein_sequence = protein_sequence,
haplotype = get_mhc1_haplotypes()[1],
peptide_length = 10,
percentile = 0.05,
ic50_prediction_tool = "EpitopePrediction"
)
})
profvis::profvis({
predict_counts(
protein_sequence = protein_sequence,
haplotype = get_mhc1_haplotypes()[2],
peptide_length = 13,
percentile = 0.05
)
predict_counts(
protein_sequence = protein_sequence,
haplotype = get_mhc1_haplotypes()[2],
peptide_length = 13,
percentile = 0.05,
ic50_prediction_tool = "netmhc2pan"
)
})
})
16 changes: 12 additions & 4 deletions tests/testthat/test-predict_counts_per_proteome.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
test_that("MHCnuggetsr, peptide length 9", {
if (!pureseqtmr::is_on_travis()) return()
if (!pureseqtmr::is_pureseqtm_installed()) return()
if (!mhcnuggetsr::is_mhcnuggets_installed()) return()
protein_sequences <- c(
Expand All @@ -9,7 +10,8 @@ test_that("MHCnuggetsr, peptide length 9", {
protein_sequences = protein_sequences,
haplotype = get_mhc1_haplotypes()[1],
peptide_length = 9,
percentile = 0.05
percentile = 0.05,
ic50_prediction_tool = "mhcnuggetsr"
)
expect_true(tibble::is_tibble(t))
expect_equal(nrow(t), length(protein_sequences))
Expand All @@ -20,6 +22,7 @@ test_that("MHCnuggetsr, peptide length 9", {
})

test_that("MHCnuggetsr, peptide length 10", {
if (!pureseqtmr::is_on_travis()) return()
if (!pureseqtmr::is_pureseqtm_installed()) return()
if (!mhcnuggetsr::is_mhcnuggets_installed()) return()

Expand All @@ -31,7 +34,8 @@ test_that("MHCnuggetsr, peptide length 10", {
protein_sequences = protein_sequences,
haplotype = get_mhc1_haplotypes()[1],
peptide_length = 10,
percentile = 0.05
percentile = 0.05,
ic50_prediction_tool = "mhcnuggetsr"
)
expect_true(tibble::is_tibble(t))
expect_equal(nrow(t), length(protein_sequences))
Expand All @@ -42,6 +46,7 @@ test_that("MHCnuggetsr, peptide length 10", {
})

test_that("MHCnuggetsr, MHC-II, peptide length 13", {
if (!pureseqtmr::is_on_travis()) return()
if (!pureseqtmr::is_pureseqtm_installed()) return()
if (!mhcnuggetsr::is_mhcnuggets_installed()) return()

Expand All @@ -53,7 +58,8 @@ test_that("MHCnuggetsr, MHC-II, peptide length 13", {
protein_sequences = protein_sequences,
haplotype = get_mhc2_haplotypes()[1],
peptide_length = 13,
percentile = 0.05
percentile = 0.05,
ic50_prediction_tool = "mhcnuggetsr"
)
expect_true(tibble::is_tibble(t))
expect_equal(nrow(t), length(protein_sequences))
Expand All @@ -64,6 +70,7 @@ test_that("MHCnuggetsr, MHC-II, peptide length 13", {
})

test_that("MHCnuggetsr on short sequence", {
if (!pureseqtmr::is_on_travis()) return()
if (!pureseqtmr::is_pureseqtm_installed()) return()
if (!mhcnuggetsr::is_mhcnuggets_installed()) return()

Expand All @@ -75,7 +82,8 @@ test_that("MHCnuggetsr on short sequence", {
protein_sequences = protein_sequences,
haplotype = get_mhc2_haplotypes()[1],
peptide_length = 13,
percentile = 0.05
percentile = 0.05,
ic50_prediction_tool = "mhcnuggetsr"
)
expect_true(tibble::is_tibble(t))
expect_equal(nrow(t), length(protein_sequences))
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-predict_ic50s.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test_that("mhcnuggets", {

if (!pureseqtmr::is_on_travis()) return()
if (!mhcnuggetsr::is_mhcnuggets_installed()) return()

expect_silent(
Expand Down

0 comments on commit 3501350

Please sign in to comment.