CalAlleleTopN: topN most frequent HLA alleles

View source: R/allele-topn.R

CalAlleleTopNR Documentation

topN most frequent HLA alleles

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

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

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 Feb. 16, 2023, 7:04 p.m.