hlaToAAVariation {midasHLA} | R Documentation

## Generate amino acid variation matrix

### Description

`hlaToAAVariation` convert HLA calls data frame to a matrix of variable amino acid positions.

### Usage

    hlaToAAVariation(hla_calls, indels = TRUE, unkchar = FALSE, as_df = TRUE)

### Arguments

`hla_calls` | HLA calls data frame, as returned by `readHlaCalls` function.
`indels` | Logical indicating whether indels should be considered when checking variability.
`unkchar` | Logical indicating whether unknown characters in the alignment should be considered when checking variability.
`as_df` | Logical indicating if data frame should be returned. Otherwise a matrix is returned.

### Details

Variable amino acid positions are found by comparing elements of the alignment column wise. Some of the values in alignment can be treated specially using `indels` and `unkchar` arguments. Function processes alignments for all HLA genes found in `hla_calls`.

Variable amino acid position uses protein alignments from EBI database.

### Value

Matrix or data frame containing variable amino acid positions. Rownames corresponds to ID column in `hla_calls`, and colnames to alignment positions. If no variation is found one column matrix filled with `NA`'s is returned.

### Examples

    hlaToAAVariation(MiDAS_tut_HLA)

[Package midasHLA version 1.2.0 Index]