ComputeScores: Compute scores

Description Usage Arguments Details Value Author(s) Examples

View source: R/GraphAlignment.R

Description

Compute scores.

Usage

1
2
ComputeScores(A, B, R, P, linkScore, selfLinkScore, nodeScore1,
  nodeScore0, lookupLink, lookupNode, symmetric=TRUE, clamp=TRUE)

Arguments

A

adjacency matrix for network A

B

adjacency matrix for network B

R

node similarity matrix

P

permutation vector to be used as the initial alignment (see InitialAlignment)

linkScore

link score matrix (see ComputeLinkParameters)

selfLinkScore

self link score matrix (see ComputeLinkParameters)

nodeScore1

node score vector (s1) (see ComputeNodeParameters)

nodeScore0

node score vector for unaligned nodes (s0) (see ComputeNodeParameters)

lookupLink

link bin lookup table (see GetBinNumber)

lookupNode

node bin lookup table (see GetBinNumber)

symmetric

network symmetry flag

clamp

clamp values to range when performing bin lookups

Details

This function computes log-likelihood scores for an alignment using the specified scoring tables, two networks A and B and their alignment P. The total score of the alignment has two contributions, the first coming from the sequence homology (node similarity, sn) and the second from the similarity of interaction networks (sl).

Value

The return value is a list containing the link score (sl) and the node score (sn).

Author(s)

Joern P. Meier, Michal Kolar, Ville Mustonen, Michael Laessig, and Johannes Berg

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
  ex<-GenerateExample(dimA=22, dimB=22, filling=.5, covariance=.6,
    symmetric=TRUE, numOrths=10, correlated=seq(1,18))
  
  pinitial<-InitialAlignment(psize=34, r=ex$r, mode="reciprocal")
  
  lookupLink<-seq(-2,2,.5)
  linkParams<-ComputeLinkParameters(ex$a, ex$b, pinitial, lookupLink)
  
  lookupNode<-c(-.5,.5,1.5)
  nodeParams<-ComputeNodeParameters(dimA=22, dimB=22, ex$r,
    pinitial, lookupNode)
  
  al<-AlignNetworks(A=ex$a, B=ex$b, R=ex$r, P=pinitial,
    linkScore=linkParams$ls,
    selfLinkScore=linkParams$ls,
    nodeScore1=nodeParams$s1, nodeScore0=nodeParams$s0,
    lookupLink=lookupLink, lookupNode=lookupNode,
    bStart=.1, bEnd=30,
    maxNumSteps=50)
  
  ComputeScores(A=ex$a, B=ex$b, R=ex$r, P=al,
    linkScore=linkParams$ls,
    selfLinkScore=linkParams$ls,
    nodeScore1=nodeParams$s1, nodeScore0=nodeParams$s0,
    lookupLink=lookupLink, lookupNode=lookupNode,
    symmetric=TRUE)

GraphAlignment documentation built on Nov. 8, 2020, 6:56 p.m.