dist_blosum: BLOSUM distance between two sequences.

View source: R/dist.R

dist_blosumR Documentation

BLOSUM distance between two sequences.

Description

Calculate the genetic distance according to the BLOSUM metric. Here, only the BLOSUM80 is implemented. BLOSUM80 definition: https://www.ncbi.nlm.nih.gov/IEB/ToolBox/C_DOC/lxr/source/data/BLOSUM80

Usage

dist_blosum(x, y, sites = NULL, logistic.scale = 15)

Arguments

x

Character vector representing the amino acids sequence.

y

Character vector representing the amino acids sequence.

logistic.scale

Numeric. Scale parameter for the logistic function when converting similarity into a distance. Default logistic.scale = 15.

Value

Numeric. BLOSUM80 distance between x and y.

Examples

x = c('A','P','P','L','E','S')
y = c('A','P','M','L','E','S')
dist_blosum(x,y,  sites = list(c(1:2), 4:6))
dist_blosum(x,y,  sites = NULL)

phac-nml-phrsd/angedist documentation built on Nov. 27, 2022, 7:23 p.m.