knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)
library(hlatools)

hlatools

Overview

hlatools provides a collection of tools to work with IPD-IMGT/HLA data

Installation

Install from GitHub using remotes:

remotes::install_github("gschofl/hlatools")

Usage

Get HLA data

Read HLA data

A HLA gene can be read into a HLAGene object:

x <- hlatools::HLAGene("DPB1")
x

A number of accessor functions can be used to work with these objects:

x <- hlatools::HLAGene("DPA1")
hlatools::db_version(x)
hlatools::locusname(x)
x1 <- x[hlatools::is_complete(x)][1:10]
hlatools::allele_name(x1)
hlatools::cwd_status(x1)
hlatools::ethnicity(x1)
hlatools::g_group(x1)
hlatools::p_group(x1)
hlatools::sequences(x1)
hlatools::exon(x1, exon = 2)

We can access previous releases of the IPD-IMGT/HLA database:

x <- hlatools::HLAGene("DPB1", db_version = "3.25.0")
x
hlatools::db_version(x)
hlatools::locusname(x)
x[hlatools::cwd_status(x) == "Common"][1:10]

These objects come with an additional set of R6-methods that implement an API used mostly in conjunction with the DR2S package:

Session Info

devtools::session_info()


gschofl/hlatools documentation built on July 2, 2021, 10:59 a.m.