Learn R Programming

Path2PPI (version 1.2.2)

homologyScore: Computes homology scores

Description

Computes the homology scores based on the BLAST E-value. This function is used by the predictPPI method to compute homology scores to decide whether an interaction in a reference species is adopted to the target species (see package vignette for a detailed description). It can be used to test which E-values lead to which scores given a predefined E-value range.

Usage

homologyScore(e.value, h.range)

Arguments

e.value
One BLAST E-value or a numeric vector with different BLAST E-values
h.range
Numeric vector consisting of two values. The first value indicates the lower bound (smallest E-value). Each E-value which is equal or less than this bound is scored with 1. The second value indicates the upper bound (biggest E-value). Each E-value which is equal or greater than this bound is scored with 0.

Value

Numeric vector containing the scores.

Details

Uses a linear function to map the E-value $v$ to the range $[l,u]$ where $l$ is the lower and $u$ the upper bound:

$$s(v)=|m\log_{10}(v)+b|$$ $$m=\frac{1}{\log_{10}(l)-\log_{10}(u)}$$ $$b=-(m\log_{10}(u))$$

See Also

predictPPI

Examples

Run this code
l <- 1e-100                                   #lower bound
u <- 1e-20                                    #upper bound
h.range <- c(l,u)                             #define range
e.values <- c(1e-20,1e-40,1e-60,1e-80,1e-100) #some BLAST E-values

homologyScore(e.values,h.range)

Run the code above in your browser using DataLab