-
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.
'get_aa_transition_matrix' returns either BLOSUM62 or (the untested) …
…FLU. Use EpitopePrediction as the IC50 prediction tool in tests
- Loading branch information
richelbilderbeek
committed
Sep 2, 2020
1 parent
9e45eb6
commit 08f10ff
Showing
12 changed files
with
86 additions
and
36 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
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,30 +1,29 @@ | ||
#' Determine if the haplotype has at least one binder to the peptide | ||
#' @inheritParams default_params_doc | ||
#' @param fragment_length the length of the peptide fragments | ||
#' the peptide will be cut into | ||
#' @author Richèl J.C. Bilderbeek | ||
#' @export | ||
is_detected <- function( | ||
protein_sequence, | ||
mhc_haplotype, | ||
fragment_length = 9, | ||
percentile = get_ic50_percentile_binder() | ||
peptide_length, | ||
percentile = get_ic50_percentile_binder(), | ||
ic50_prediction_tool | ||
) { | ||
bbbq::check_mhc_haplotype_name(mhc_haplotype) | ||
|
||
|
||
ic50_threshold <- mhcnpreds::get_ic50_threshold( | ||
peptide_length = fragment_length, | ||
mhc_haplotype = mhcnuggetsr::to_mhcnuggets_name(mhc_haplotype), | ||
percentile = percentile | ||
ic50_threshold <- bbbq::get_ic50_threshold( | ||
peptide_length = peptide_length, | ||
haplotype = mhc_haplotype, | ||
percentile = percentile, | ||
ic50_prediction_tool = ic50_prediction_tool | ||
) | ||
|
||
results <- mhcnuggetsr::predict_ic50s( | ||
mhcnuggets_options = mhcnuggetsr::create_mhcnuggets_options( | ||
mhc = mhcnuggetsr::to_mhcnuggets_name(mhc_haplotype) | ||
), | ||
results <- bbbq::predict_ic50s( | ||
protein_sequence = protein_sequence, | ||
peptide_length = fragment_length | ||
peptide_length = peptide_length, | ||
haplotype = mhc_haplotype, | ||
ic50_prediction_tool = ic50_prediction_tool | ||
) | ||
sum(results$ic50 < ic50_threshold) > 0 | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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,18 +1,21 @@ | ||
test_that("use", { | ||
|
||
if (!mhcnuggetsr::is_mhcnuggets_installed()) return() | ||
|
||
expect_true( | ||
is_detected( | ||
"VVIILTIAGN", | ||
mhc_haplotype = mhcnuggetsr::get_mhc_1_haplotypes()[4], | ||
percentile = 0.5 | ||
mhc_haplotype = bbbq::get_mhc1_haplotypes()[1], | ||
peptide_length = 9, | ||
percentile = 0.5, | ||
ic50_prediction_tool = "EpitopePrediction" | ||
) | ||
) | ||
expect_false( | ||
is_detected( | ||
"AAAARTIAGR", | ||
mhc_haplotype = mhcnuggetsr::get_mhc_1_haplotypes()[20] | ||
mhc_haplotype = bbbq::get_mhc1_haplotypes()[1], | ||
peptide_length = 9, | ||
percentile = 0.01, | ||
ic50_prediction_tool = "EpitopePrediction" | ||
) | ||
) | ||
}) |