Skip to contents

Convert the long table returned by ukb_hla_specify() into a wide table suitable for downstream analysis: eid, <allele>, <allele>_carrier, ...

Usage

ukb_hla_clean(res)

Arguments

res

A data.frame with columns eid, query, copies, carrier.

Value

A wide-format data.frame with one row per eid.

Examples

if (FALSE) { # \dontrun{
header <- ukb_hla_header()
hla <- data.table::fread("HLA.csv") %>%
  ukb_hla_typing(header) %>%
  ukb_hla_specify("B27") %>%
  ukb_hla_clean()
} # }