diff --git a/R/predict_counts.R b/R/predict_counts.R index b7a2264..5914a8d 100644 --- a/R/predict_counts.R +++ b/R/predict_counts.R @@ -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( diff --git a/R/predict_counts_per_proteome.R b/R/predict_counts_per_proteome.R index 179d5fe..251d94d 100644 --- a/R/predict_counts_per_proteome.R +++ b/R/predict_counts_per_proteome.R @@ -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)) { diff --git a/R/predict_n_coincidence_tmh_peptide.R b/R/predict_n_coincidence_tmh_peptide.R index abd737f..a2010ad 100644 --- a/R/predict_n_coincidence_tmh_peptide.R +++ b/R/predict_n_coincidence_tmh_peptide.R @@ -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, diff --git a/man/predict_counts.Rd b/man/predict_counts.Rd index e7172c1..fd27cef 100644 --- a/man/predict_counts.Rd +++ b/man/predict_counts.Rd @@ -10,7 +10,7 @@ predict_counts( peptide_length, percentile, verbose = FALSE, - ic50_prediction_tool = "mhcnuggetsr" + ic50_prediction_tool ) } \arguments{ diff --git a/man/predict_counts_per_proteome.Rd b/man/predict_counts_per_proteome.Rd index f8ffc96..34ad4b4 100644 --- a/man/predict_counts_per_proteome.Rd +++ b/man/predict_counts_per_proteome.Rd @@ -10,7 +10,7 @@ predict_counts_per_proteome( peptide_length, percentile, verbose = FALSE, - ic50_prediction_tool = "mhcnuggetsr" + ic50_prediction_tool ) } \arguments{ diff --git a/man/predict_n_coincidence_tmh_peptide.Rd b/man/predict_n_coincidence_tmh_peptide.Rd index c54113f..b0c3f2f 100644 --- a/man/predict_n_coincidence_tmh_peptide.Rd +++ b/man/predict_n_coincidence_tmh_peptide.Rd @@ -10,7 +10,7 @@ predict_n_coincidence_tmh_peptide( protein_sequence, peptide_length, verbose = FALSE, - ic50_prediction_tool = "mhcnuggetsr" + ic50_prediction_tool ) } \arguments{ diff --git a/tests/testthat/test-get_ic50_threshold.R b/tests/testthat/test-get_ic50_threshold.R index 832a7c6..2db5d81 100644 --- a/tests/testthat/test-get_ic50_threshold.R +++ b/tests/testthat/test-get_ic50_threshold.R @@ -1,5 +1,5 @@ test_that("mhcnuggets", { - + if (!pureseqtmr::is_on_travis()) return() if (!mhcnuggetsr::is_mhcnuggets_installed()) return() expect_silent( diff --git a/tests/testthat/test-predict_counts.R b/tests/testthat/test-predict_counts.R index c8886d2..e7ae70b 100644 --- a/tests/testthat/test-predict_counts.R +++ b/tests/testthat/test-predict_counts.R @@ -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() @@ -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, @@ -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() @@ -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, @@ -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() @@ -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, @@ -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" - ) - }) -}) diff --git a/tests/testthat/test-predict_counts_per_proteome.R b/tests/testthat/test-predict_counts_per_proteome.R index 6c56af3..c326585 100644 --- a/tests/testthat/test-predict_counts_per_proteome.R +++ b/tests/testthat/test-predict_counts_per_proteome.R @@ -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( @@ -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)) @@ -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() @@ -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)) @@ -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() @@ -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)) @@ -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() @@ -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)) diff --git a/tests/testthat/test-predict_ic50s.R b/tests/testthat/test-predict_ic50s.R index ce200fb..9015c5d 100644 --- a/tests/testthat/test-predict_ic50s.R +++ b/tests/testthat/test-predict_ic50s.R @@ -1,5 +1,5 @@ test_that("mhcnuggets", { - + if (!pureseqtmr::is_on_travis()) return() if (!mhcnuggetsr::is_mhcnuggets_installed()) return() expect_silent(