List HLA alleles and amino acid residues at a given position.

summariseAAPosition(hla_calls, aa_pos, aln = NULL, na.rm = FALSE)

Arguments

hla_calls

HLA calls data frame, as returned by readHlaCalls function.

aa_pos

String specifying gene and amino acid position, example "A_9".

aln

Matrix containing amino acid sequence alignments as returned by readHlaAlignments function. By default function will use alignment files shipped with the package.

na.rm

Logical flag indicating if NA values should be considered for frequency calculations.

Value

Data frame containing HLA alleles, their corresponding amino acid residues and frequencies at requested position.

Examples

summariseAAPosition(MiDAS_tut_HLA, "A_9")
#>   HLA-A (9)
#> 1         F
#> 2         S
#> 3         T
#> 4         Y
#>                                                                                                                                                                                                                                                               HLA-A alleles
#> 1                                        *01:01, *01:234, *01:237, *01:274, *01:98, *02:01, *02:02, *02:03, *02:07, *02:211, *02:22, *02:60, *02:614, *02:642, *02:686, *02:753, *02:763, *03:01, *03:02, *03:24, *03:312, *24:104, *31:21, *32:01, *32:02, *32:116, *74:01
#> 2                                                                                                                                            *01:02, *03:72, *11:88, *23:01, *23:17, *23:18, *24:02, *24:03, *24:04, *24:07, *24:20, *24:95, *26:16, *30:01, *30:02, *30:04
#> 3                                                                                                                                                                        *03:205, *11:43, *29:01, *29:02, *29:119, *31:01, *31:08, *33:01, *33:03, *33:05, *33:125, *33:163
#> 4 *01:43, *02:05, *02:06, *02:08, *02:10, *02:324, *11:01, *11:02, *11:03, *11:12, *11:306, *11:50, *24:50, *25:01, *25:09, *25:25, *26:01, *26:02, *26:03, *26:08, *33:51, *34:01, *34:02, *66:01, *68:01, *68:02, *68:04, *68:16, *68:164, *68:17, *68:23, *68:66, *69:01
#>   count frequency
#> 1  1037    51.85%
#> 2   379    18.95%
#> 3   155     7.75%
#> 4   429    21.45%