readHlaCalls read HLA allele calls from file

readHlaCalls(file, resolution = 4, na.strings = c("Not typed", "-", "NA"))

Arguments

file

Path to input file.

resolution

Number specifying desired resolution.

na.strings

a character vector of strings which are to be interpreted as NA values. Blank fields are also considered to be missing values in logical, integer, numeric and complex fields. Note that the test happens after white space is stripped from the input, so na.strings values may need their own white space stripped in advance.

Value

HLA calls data frame. First column hold sample IDs, further columns hold HLA allele numbers.

Details

Input file has to be a tsv formatted table with a header. First column should contain sample IDs, further columns hold HLA allele numbers. See system.file("extdata", "MiDAS_tut_HLA.txt", package = "midasHLA") file for an example.

resolution parameter can be used to reduce HLA allele numbers. If reduction is not needed resolution can be set to 8. resolution parameter can take the following values: 2, 4, 6, 8. For more details about HLA allele numbers resolution see http://hla.alleles.org/nomenclature/naming.html.

Examples

file <- system.file("extdata", "MiDAS_tut_HLA.txt", package = "midasHLA")
hla_calls <- readHlaCalls(file)