readHlaCalls: Read HLA allele calls

View source: R/parsingFunctions.R

readHlaCallsR Documentation

Read HLA allele calls

Description

readHlaCalls read HLA allele calls from file

Usage

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.

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.

Value

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

Examples

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


Genentech/midasHLA documentation built on Feb. 12, 2024, 9:38 a.m.