hmm_distance {protHMM}R Documentation

hmm_distance

Description

This feature calculates the cosine distance matrix between two HMMs AA and BB before dynamic time warp is applied to the distance matrix calculate the cumulative distance between the HMMs, which acts as a measure of similarity, The cosine distance matrix DD is found to be D[ai,bj]=1aibjTaiaiTbjbjTD[a_i, b_j] = 1 - \frac{a_ib_j^{T}}{a_ia_i^Tb_jb_j^T}, in which aia_i and aia_i refer to row vectors of AA and BB respectively. This in turn means that DD is of dimensions nrow(A),nrow(b)nrow(A), nrow(b). Dynamic time warp then calculates the cumulative distance by calculating matrix C[i,j]=min(C[i1,j],C[i,j1],C[i1,j1])+D[i,j]C[i, j] = min(C[i-1, j], C[i, j-1], C[i-1, j-1]) + D[i, j], where Ci,jC_{i,j} is 0 when ii or jj are less than 1. The lower rightmost point of the matrix CC is then returned as the cumulative distance between proteins.

Usage

hmm_distance(hmm_1, hmm_2)

Arguments

hmm_1

The name of a profile hidden markov model file.

hmm_2

The name of another profile hidden markov model file.

Value

A double that indicates distance between the two proteins.

References

Lyons, J., Paliwal, K. K., Dehzangi, A., Heffernan, R., Tsunoda, T., & Sharma, A. (2016). Protein fold recognition using HMM–HMM alignment and dynamic programming. Journal of Theoretical Biology, 393, 67–74.

Examples

h<- hmm_distance(system.file("extdata", "1DLHA2-7", package="protHMM"),
system.file("extdata", "1TEN-7", package="protHMM"))

[Package protHMM version 0.1.1 Index]