Skip to contents

get_mismatches() returns mismatched HLAs given a donor and recipient HLA typing. That is, those antigens that occur in the donor but not the recipient typing.

Usage

get_mismatches(donor, recipient)

Arguments

donor, recipient

A pair of strings containing the donor and recipient HLA typing, respectively. Each antigen must be separated by a space.

Value

A string with the mismatched antigens (separated by spaces).

Examples

donor <- "A1 A2"
recipient <- "A1 A2"
get_mismatches(donor, recipient)
#> [1] ""
#> ""
get_mismatches("A1 A2", "A3 A4")
#> [1] "A1 A2"
#> "A1 A2"
get_mismatches("A1 A2 B5", "A3 A4 B5 B12")
#> [1] "A1 A2"
#> "A1 A2"