README.md

netmhcpan

CRAN_Status_Badge

Branch |GitHub Actions |Travis CI logo |Codecov logo ---------|-------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------ master |R-CMD-check |Build Status |codecov.io develop|R-CMD-check|Build Status|codecov.io

R package for NetMHCpan [1].

Please note that this page is intended for academic users only. Other users are requested to contact the Software Package Manager at health-software@dtu.dk

Install

Use usethis (or devtools) to install the netmhcpan package:

usethis::install_github("tzina97/netMHCpan")

Load the netmhcpan library:

library(netmhcpan)

Install NetMHCpan to a default folder using netmhcpan and a download URL. The download URL can be obtained from the NetMHCpan website at https://services.healthtech.dtu.dk/service.php?NetMHCpan-4.1/ and expires after four hours.

install_netmhcpan("UPDATE LINK")

Installation troubleshooting

URL is expired

Request a new download link

cannot open URL 'https://services.healthtech.dtu.dk/download/[number]/netMHCpan-4.1.Linux.tar.gz'

From a fresh download link, you can download the file, yet not install using the install_netmhcpan function.

In that case, use the install_netmhcpan_bin_from_file function:

install_netmhcpan_bin_from_file("netMHCpan-4.1.Linux.tar.gz")

This function assumes that the file netMHCpan-4.1.Linux.tar.gz is in the working directory.

After this, install like normal:

install_netmhcpan()

cannot open URL 'https://services.healthtech.dtu.dk/services/NetMHCpan-4.1/data.tar.gz'

This happens when the university website is down (yes, this has happened!).

In that case, use the install_netmhcpan_data_from_file function:

install_netmhcpan_data_from_file("data.Linux.tar.gz")

This function assumes that the file data.Linux.tar.gz is in the working directory.

After this, install like normal:

install_netmhcpan()

Usage

We start from a FASTA file with one or more protein sequences:

fasta_filename <- system.file(
  "extdata", "example.fasta", package = "netmhcpan"
)

This is how to content of such a FASTA file looks like:

message(readLines(fasta_filename), sep = "\n")
>sp|L0T550|RIP2_MYCTU_158_180
AVLWAGVAFLAFLQLTALVLNLL

MHC2 has multiple alleles that bind differently to protein parts. NetMHCIIpan supports more than 5000 alleles:

all_alleles <- get_netmhcpan_alleles()
testit::assert(length(all_alleles) > 5000)

We simply pick the first two alleles:

alleles <- all_alleles[1:2]

Running the NetMHCpan analysis:

bindings <- run_netmhcpan(
  fasta_filename = fasta_filename,
  alleles = alleles
)

The data frame bindings contains the results:

knitr::kable(bindings)

| Pos|Peptide |ID |Allele | one_minus_log50k| nM| Rank| |---:|:---------------|:--------------------------------------|:---------|----------------:|-------:|----:| | 1|AVLWAGVAFLAFLQL |sp|L0T550|RIP2_MYCTU_158_180 |DRB1_0101 | 0.510| 201.09| 39.0| | 2|VLWAGVAFLAFLQLT |sp|L0T550|RIP2_MYCTU_158_180 |DRB1_0101 | 0.475| 293.98| 47.0| | 3|LWAGVAFLAFLQLTA |sp|L0T550|RIP2_MYCTU_158_180 |DRB1_0101 | 0.524| 172.31| 36.0| | 4|WAGVAFLAFLQLTAL |sp|L0T550|RIP2_MYCTU_158_180 |DRB1_0101 | 0.566| 109.07| 26.0| | 5|AGVAFLAFLQLTALV |sp|L0T550|RIP2_MYCTU_158_180 |DRB1_0101 | 0.602| 73.94| 19.0| | 6|GVAFLAFLQLTALVL |sp|L0T550|RIP2_MYCTU_158_180 |DRB1_0101 | 0.680| 31.93| 7.0| | 7|VAFLAFLQLTALVLN |sp|L0T550|RIP2_MYCTU_158_180 |DRB1_0101 | 0.688| 29.20| 6.5| | 8|AFLAFLQLTALVLNL |sp|L0T550|RIP2_MYCTU_158_180 |DRB1_0101 | 0.680| 32.04| 7.0| | 9|FLAFLQLTALVLNLL |sp|L0T550|RIP2_MYCTU_158_180 |DRB1_0101 | 0.669| 35.92| 8.5| | 1|AVLWAGVAFLAFLQL |sp|L0T550|RIP2_MYCTU_158_180 |DRB1_0102 | 0.346| 1188.96| 38.0| | 2|VLWAGVAFLAFLQLT |sp|L0T550|RIP2_MYCTU_158_180 |DRB1_0102 | 0.329| 1414.85| 44.0| | 3|LWAGVAFLAFLQLTA |sp|L0T550|RIP2_MYCTU_158_180 |DRB1_0102 | 0.379| 823.82| 28.0| | 4|WAGVAFLAFLQLTAL |sp|L0T550|RIP2_MYCTU_158_180 |DRB1_0102 | 0.406| 616.05| 21.0| | 5|AGVAFLAFLQLTALV |sp|L0T550|RIP2_MYCTU_158_180 |DRB1_0102 | 0.425| 504.55| 17.0| | 6|GVAFLAFLQLTALVL |sp|L0T550|RIP2_MYCTU_158_180 |DRB1_0102 | 0.458| 353.10| 11.0| | 7|VAFLAFLQLTALVLN |sp|L0T550|RIP2_MYCTU_158_180 |DRB1_0102 | 0.456| 360.90| 11.0| | 8|AFLAFLQLTALVLNL |sp|L0T550|RIP2_MYCTU_158_180 |DRB1_0102 | 0.456| 361.54| 11.0| | 9|FLAFLQLTALVLNLL |sp|L0T550|RIP2_MYCTU_158_180 |DRB1_0102 | 0.442| 420.88| 14.0|

The strongest binding is between the MHC allele DRB1_0101 at the 7th (to and including 21st) amino acid of the sp&#124;L0T550&#124;RIP2_MYCTU_158_180 protein, as it is in the top 6.5% of best binders.

FAQ

Under which operating systems does netmhcpan work?

netmhcpan can only work on the set of operating systems NetMHCpan works on. Currently, only Linux is supported:

Operating system|Supported by NetMHCpan|Supported by netmhcpan ----------------|------------------------|------------------------- Darwin |Y |N Linux |Y |Y Windows |N |N

Are there similar packages?

These are the ones I use:

References



tzina97/netMHCpanW documentation built on April 26, 2022, 1:18 a.m.