---
title: "Code and explanations to generate external datasets"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

## MHC Restriction Ontology (MRO)

The mro.owl file was downloaded from: http://purl.obolibrary.org/obo/mro.owl
`immunotation` package version 0.99.2 corresponds to MRO OWL version 2021-03-09.

Then the owl format was converted to obo format uding the robot program 
(http://robot.obolibrary.org/)

```{bash}
robot convert --input ../extdata/mro.owl --format owl --output ../extdata/mro.obo 
```

Finally, gzip was used to create the file mro.obo.gz, which is located in 
inst/extdata.

## Source files for P groups and G groups

The files hla_nom_g.txt and hla_nom_p.txt were downloaded from the following 
resource:

```{bash}
wget https://raw.githubusercontent.com/ANHIG/IMGTHLA/Latest/wmda/hla_nom_g.txt 

wget https://raw.githubusercontent.com/ANHIG/IMGTHLA/Latest/wmda/hla_nom_p.txt
```

`immunotation` package version 0.99.2 corresponds to:

- file: hla_nom_p.txt, date: 2021-04-20
- file: hla_nom_g.txt, date: 2021-04-20

## List of valid alleles for AFND query

An optional file AFND_valid_alleles.Rdata is contained in inst/extdata.
It is generated by the function `update_valid_alleles` in the R script 
AFND_queries.R.