getAAFrequencies {midasHLA} | R Documentation

## Calculate amino acid frequencies

### Description

`getAAFrequencies` calculates amino acid frequencies in amino acid data frame.

### Usage

    getAAFrequencies(aa_variation)

### Arguments

`aa_variation` | Amino acid variation data frame as returned by hlaToAAVariation.

### Details

Both gene copies are taken into consideration for frequencies calculation, `frequency = n / (2 * j)` where `n` is the number of amino acid occurrences and `j` is the number of samples in `aa_variation`.

### Value

Data frame with each row holding specific amino acid position, it's count and frequency.

### Examples

    aa_variation <- hlaToAAVariation(MiDAS_tut_HLA)
    getAAFrequencies(aa_variation)

[Package midasHLA version 1.2.0 Index]