Skip to contents

This function converts an residue position to a position in the frame of the alignment.

Usage

res_to_poi(alignment, res)

Arguments

alignment

An alignment.

res

A residue position.

Value

An integer vector of alignment positions corresponding to residue position in the reference sequence.

Examples

align_ATM <- read_alignment('ATM')
align_ATM[, 1:6]
#> Hsap_ATM_AAB65827.1  1 M-SLVL
#> Mmus_ATM_NP_031525.2 1 M-SLAL
#> Sscr_ATM_AAT01608.1  1 M-SLAL
#> Mdom_ATM_IARC        1 M-SLAL
#> Ggal_ATM_edited      1 M-SLVL
#> Xlae_ATM_AAT72929.1  1 M-SLAL
#> Drer_ATM_IARC_v2     1 M-SLAL
#> Bflo_ATM_IARC        1 MTDLLT
#> Spur_ATM_ABY60856.1  1 MAEVLI

# Convert the positions of the first five residues to alignment positions
res_to_poi(align_ATM, 1:5)
#> [1] 1 3 4 5 6