hla_trimnames: Trim HLA allele names to the specified number of fields.

View source: R/hla_trimnames.R

hla_trimnamesR Documentation

Trim HLA allele names to the specified number of fields.

Description

Given a vector of HLA allele names with the format "A*01:01:01:01", returns all or unique allele names at the digit resolution specified by fields.

Usage

hla_trimnames(alleles_vec, fields = 3)

Arguments

alleles_vec

character string. Vector of allele names.

fields

integer. Number of fields to trim names to.

Value

All or unique HLA alleles trimmed names.

Examples

hla_trimnames(c("A*01:01:01:01", "A*02:01:01:01"), fields = 2)

genevol-usp/hlaseqlib documentation built on Aug. 24, 2022, 7:24 a.m.