The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
For this vignette, we use the same example as the MHCnuggets Python notebooks.
Get the path to the testing peptides, and show them:
if (is_mhcnuggets_installed()) {
peptides_path <- get_example_filename("test_peptides.peps")
expect_true(file.exists(peptides_path))
readLines(peptides_path, warn = FALSE)
}Pick an MHC-I haplotype:
if (is_mhcnuggets_installed()) {
mhc_1_haplotype <- "HLA-A02:01"
expect_true(mhc_1_haplotype %in% get_trained_mhc_1_haplotypes())
}Predict:
#{r mhc1_predict_ic50_from_file_no_ba_models}
if (is_mhcnuggets_installed()) {
mhcnuggets_options <- create_mhcnuggets_options(
mhc = mhc_1_haplotype
)
df <- predict_ic50_from_file(
peptides_path = peptides_path,
mhcnuggets_options = mhcnuggets_options
)
kable(df)
}
Predict:
#{r mhc1_predict_ic50_from_file_ba_models}
if (is_mhcnuggets_installed()) {
mhcnuggets_options <- create_mhcnuggets_options(
mhc = mhc_1_haplotype,
ba_models = TRUE
)
df <- predict_ic50_from_file(
peptides_path = peptides_path,
mhcnuggets_options = mhcnuggets_options
)
kable(df)
}
Use MCH-II haplotype:
if (is_mhcnuggets_installed()) {
mhc_2_haplotype <- "HLA-DRB101:01"
expect_true(mhc_2_haplotype %in% get_trained_mhc_2_haplotypes())
}Predict:
#{r mhc2_predict_ic50_from_file_no_ba_models}
if (is_mhcnuggets_installed()) {
mhcnuggets_options <- create_mhcnuggets_options(
mhc = mhc_2_haplotype
)
df <- predict_ic50_from_file(
peptides_path = peptides_path,
mhcnuggets_options = mhcnuggets_options
)
kable(df)
}
Use another MHC-I haplotype. In this case, MHCnuggets has not been trained upon it, but it is a valid supertype:
if (is_mhcnuggets_installed()) {
mhc_1_haplotype <- "HLA-A02:60"
expect_false(mhc_1_haplotype %in% get_trained_mhc_1_haplotypes())
}Predict:
#{r predict_mhc_1_haplotype_supertype}
if (is_mhcnuggets_installed()) {
mhcnuggets_options <- create_mhcnuggets_options(
mhc_class = "I",
mhc = mhc_1_haplotype
)
df <- predict_ic50_from_file(
peptides_path = peptides_path,
mhcnuggets_options = mhcnuggets_options
)
kable(df)
}
These are the MHC-I haplotypes that have a trained model.
These are the MHC-II haplotypes that have a trained model.
mhcnuggetsr_report()
#> ***************
#> * mhcnuggetsr *
#> ***************
#> OS: unix
#> **************
#> * MHCnuggets *
#> **************
#> Is MHCnuggets installed: FALSE
#> ****************
#> * session info *
#> ****************
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.3.3 (2024-02-29)
#> os Ubuntu 24.04.4 LTS
#> system x86_64, linux-gnu
#> ui X11
#> language (EN)
#> collate C
#> ctype en_US.UTF-8
#> tz Europe/Stockholm
#> date 2026-07-04
#> pandoc 3.1.3 @ /usr/bin/ (via rmarkdown)
#> quarto 1.3.450 @ /usr/local/bin/quarto
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date (UTC) lib source
#> brio 1.1.5 2024-04-24 [2] CRAN (R 4.3.3)
#> bslib 0.11.0 2026-05-16 [2] CRAN (R 4.3.3)
#> cachem 1.1.0 2024-05-16 [2] CRAN (R 4.3.3)
#> cli 3.6.6 2026-04-09 [2] CRAN (R 4.3.3)
#> devtools 2.5.2 2026-04-30 [2] CRAN (R 4.3.3)
#> digest 0.6.39 2025-11-19 [2] CRAN (R 4.3.3)
#> ellipsis 0.3.3 2026-04-04 [2] CRAN (R 4.3.3)
#> evaluate 1.0.5 2025-08-27 [2] CRAN (R 4.3.3)
#> fastmap 1.2.0 2024-05-15 [2] CRAN (R 4.3.3)
#> fs 2.1.0 2026-04-18 [2] CRAN (R 4.3.3)
#> glue 1.8.1 2026-04-17 [2] CRAN (R 4.3.3)
#> htmltools 0.5.9 2025-12-04 [2] CRAN (R 4.3.3)
#> jquerylib 0.1.4 2021-04-26 [2] CRAN (R 4.3.3)
#> jsonlite 2.0.0 2025-03-27 [2] CRAN (R 4.3.3)
#> knitr * 1.51 2025-12-20 [2] CRAN (R 4.3.3)
#> lifecycle 1.0.5 2026-01-08 [2] CRAN (R 4.3.3)
#> magrittr 2.0.5 2026-04-04 [2] CRAN (R 4.3.3)
#> memoise 2.0.1 2021-11-26 [2] CRAN (R 4.3.3)
#> mhcnuggetsr * 1.2.6 2026-07-04 [1] local
#> otel 0.2.0 2025-08-29 [2] CRAN (R 4.3.3)
#> pkgbuild 1.4.8 2025-05-26 [2] CRAN (R 4.3.3)
#> pkgload 1.5.2 2026-04-22 [2] CRAN (R 4.3.3)
#> purrr 1.2.2 2026-04-10 [2] CRAN (R 4.3.3)
#> R6 2.6.1 2025-02-15 [2] CRAN (R 4.3.3)
#> rappdirs 0.3.4 2026-01-17 [2] CRAN (R 4.3.3)
#> rlang 1.2.0 2026-04-06 [2] CRAN (R 4.3.3)
#> rmarkdown 2.31 2026-03-26 [2] CRAN (R 4.3.3)
#> sass 0.4.10 2025-04-11 [2] CRAN (R 4.3.3)
#> sessioninfo 1.2.3 2025-02-05 [2] CRAN (R 4.3.3)
#> testthat * 3.3.2 2026-01-11 [2] CRAN (R 4.3.3)
#> usethis 3.2.1 2025-09-06 [2] CRAN (R 4.3.3)
#> vctrs 0.7.3 2026-04-11 [2] CRAN (R 4.3.3)
#> xfun 0.57 2026-03-20 [2] CRAN (R 4.3.3)
#> yaml 2.3.12 2025-12-10 [2] CRAN (R 4.3.3)
#>
#> [1] /tmp/RtmpjAub9Z/Rinsta2095ae47f80
#> [2] /home/richel/R/x86_64-pc-linux-gnu-library/4.3
#> [3] /usr/local/lib/R/site-library
#> [4] /usr/lib/R/site-library
#> [5] /usr/lib/R/library
#> * ── Packages attached to the search path.
#>
#> ──────────────────────────────────────────────────────────────────────────────These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.