Home

Awesome

<!-- README.md is generated from README.Rmd. Please edit that file -->

mhcnuggetsr

<!-- badges: start -->

Lifecycle:
stable CRAN
status

BranchGitHub ActionsCodecov logo
masterR-CMD-checkcodecov.io
developR-CMD-checkcodecov.io
<!-- badges: end -->

mhcnuggetsr is broken, see here, as the import of the MHCnuggets Python package by `reticulate`` fails. If you know how to fix this, please contact me

R package to work with MHCnuggets.

The goal of mhcnuggetsr is to predict the half maximal inhibitory concentration of peptides for an MHC haplotype. It does by calling MHCnuggets.

Installation

You can install the released version of mhcnuggetsr from GitHub with:

remotes::install_github("richelbilderbeek/mhcnuggetsr")

Install MHCnuggets using the non-CRAN extension mhcnuggetsrinstall:

# {r install}
library(mhcnuggetsr)

if (!is_mhcnuggets_installed()) {
  remotes::install_github("richelbilderbeek/mhcnuggetsrinstall")
  mhcnuggetsrinstall::install_mhcnuggets()
  mhcnuggetsr_self_test()
}

Example

Here is how to get the IC50 values (in nM) for the peptides in an example file:

# {r example}
library(testthat)
library(mhcnuggetsr)

if (is_mhcnuggets_installed()) {
  mhcnuggets_options <- create_mhcnuggets_options(
    mhc = "HLA-A02:01"
  )
  
  df <- predict_ic50(
    peptides = "AIAACAMLLV",
    mhcnuggets_options = mhcnuggets_options
  )
  expect_equal(df$ic50, 5578.77)
}

How can I suppress the output when making a prediction?

One cannot until MHCnuggets allows to do so. Issue is posted here.

There is a feature I miss

See CONTRIBUTING, at Submitting use cases

I want to collaborate

See CONTRIBUTING, at ‘Submitting code’

I think I have found a bug

See CONTRIBUTING, at ‘Submitting bugs’

There’s something else I want to say

Sure, just add an Issue. Or send an email.

External links

References

Article about MHCnuggets: