getField {HLAtools}R Documentation

Trim Colon-Delimited HLA Allele Names by Field

Description

Trims a properly formatted colon-delimited HLA allele name to a desired number of fields.

If an allele name with an expression-variant suffix is truncated, the suffix can be appended to the end of the truncated allele name. If a resolution value greater then the number of fields in the submitted field is specified, the original allele is returned.

Usage

getField(allele, res, append = FALSE)

Arguments

allele

A character string representing an HLA allele.

res

A numeric describing the resolution desired.

append

A logical that, when TRUE, appends the expression variant suffix of a full-length allele name to a truncated allele name. The default value is FALSE.

Value

A version of the 'allele' character string that has been trimmed to 'res' resolution.

Note

For internal HLAtools use.

Examples

getField("HLA-A*01:01:01:01", 3)
getField("DRB1*11:01:01:12N", 2,TRUE)


[Package HLAtools version 1.1.1 Index]