getVariableAAPos: Find variable positions in sequence alignment

View source: R/utils.R

getVariableAAPosR Documentation

Find variable positions in sequence alignment

Description

getVariableAAPos finds variable amino acid positions in protein sequence alignment.

Usage

getVariableAAPos(alignment, varchar = "[A-Z]")

Arguments

alignment

Matrix containing amino acid level alignment, as returned by readHlaAlignments,

varchar

Regex matching characters that should be considered when looking for variable amino acid positions. See details for further explanations.

Details

The variable amino acid positions in the alignment are those at which different amino acids can be found. As the alignments can also contain indels and unknown characters, the user choice might be to consider those positions as variable or not. This can be achieved by passing appropriate regular expression in varchar. Eg. when varchar = "[A-Z]" occurence of deletion/insertion (".") will not be treated as variability. In order to detect this kind of variability varchar = "[A-Z\\.]" should be used.

Value

Integer vector specifying which alignment columns are variable.

Examples

alignment <- readHlaAlignments(gene = "TAP1")
getVariableAAPos(alignment)


Genentech/MiDAS documentation built on Feb. 5, 2024, 11:52 a.m.