CleanAllele {hlaR} | R Documentation |
Clean messy HLA typing data
Description
This function takes raw messy HLA(Human Leukocyte Antigen) typing data as input. It removes inconsistent formatting and unnecessary symbols. If one of two alleles at a loci is NA, the locus is assumed to be homozygous.
Usage
CleanAllele(var_1, var_2)
Arguments
var_1 |
HLA on allele 1. |
var_2 |
HLA on allele 2. |
Value
A data frame with 4 columns: - 'var_1': raw messy input hla, identical with first input - 'var_2': raw messy input hla, identical with second input - 'locus1_clean': cleaned hla of var_1 - 'locus2_clean': cleaned hla of var_2
Examples
dat <- read.csv(system.file("extdata/example", "HLA_Clean_test.csv", package = "hlaR"))
re <- CleanAllele(dat$recipient_a1, dat$recipient_a2)
[Package hlaR version 1.0.0 Index]