CleanAllele: Clean messy HLA typing data

Description Usage Arguments Value Examples

View source: R/allele-clean.R

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

1
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

1
2
dat <-  read.csv(system.file("extdata/example", "HLA_Clean_test.csv", package = "hlaR"))
re <- CleanAllele(dat$recipient_a1, dat$recipient_a2)

hlaR documentation built on Sept. 28, 2021, 1:06 a.m.