CalAlleleTopN: topN most frequent HLA alleles

Description Usage Arguments Value Examples

View source: R/allele-topn.R

Description

Input cleaned HLA(Human Leukocyte Antigen) data for a population of transplant donors and recipients to determine the most common alleles represented in the population.

Usage

1
CalAlleleTopN(dat_in, nms_don = c(), nms_rcpt = c(), top_n = 5)

Arguments

dat_in

A data frame with clean HLA typing data.

nms_don

A vector of donor's allele name(s).

nms_rcpt

A vector of recipient's allele name(s).

top_n

Number of alleles to return. Default is 5.

Value

A tibble of top_n most frequent alleles.

Examples

1
2
3
4
dat <- read.csv(system.file("extdata/example", "HLA_MisMatch_test.csv", package = "hlaR"))
don <- c("donor.a1", "donor.a2")
rcpt <- c("recipient.a1", "recipient.a2")
re <- CalAlleleTopN(dat_in = dat, nms_don = don, nms_rcpt = rcpt, top_n = 2)

hlaR documentation built on Sept. 28, 2021, 1:06 a.m.