Functions

Functions

IsoRank.isorankFunction.
isorank(G1::SparseMatrixCSC, G2::SparseMatrixCSC,
        [alpha::Real=0.85, B::AbstractMatrix=ones(Float64,size(G1,1),size(G2,1))];
        <keyword arguments>) -> R [, res, L]

Creates the IsoRank matrix, which contains topological similarities of all nodes across two networks (See Rohit Singh, Jinbo Xu, and Bonnie Berger. (2008) Global alignment of multiple protein interaction networks with application to functional orthology detection, Proc. Natl. Acad. Sci. USA, 105:12763-12768.). That is, finds the PageRank values of the modified adjacency matrix of the product graph of G1 and G2. B, containing prior node similarities, acts as the personalization vector, allowing you to incorporate external information. If you don't have node similarities, you can still create a good IsoRank matrix by damping like PageRank does.

Arguments

  • G1,G2 : two adjacency matrices of undirected networks

  • B : matrix of node similarities between G1 and G2, not necessarily normalized

  • alpha: weight between edge and node conservation

Keyword arguments

  • details=false : If true, returns (R,res,L) where R is the IsoRank matrix of node similarities, res is the power method detailed results structure, L is the linear operator that the power method finds the eigenvector of; if false, returns R

  • See powermethod! for other keyword arguments

source
IsoRank.greedyalignFunction.
greedyalign(R::AbstractMatrix,seeds=Vector{Tuple{Int,Int}}();
            maxiter=size(R,1)-length(seeds))

Given matrix R, find a alignment using the greedy method.

Arguments

  • R : m x n matrix

  • seeds : Initial seed node pairs

  • maxiter : Stop after aligning maxiter node pairs

source
IsoRank.pagerankFunction.
 pagerank(A, alpha=0.85, p = fill(1/size(A,2),size(A,2)),
          x=copy(p), Ax=similar(x);
          <keyword args>) -> x [, res, L]

Creates PageRank vector.

Arguments

  • A : Adjacency matrix of the graph. A[u,v] = 1 if u -> v

  • alpha : Damping.

  • p : Initial probability vector, or personalization vector, not necessarily normalized.

Keyword arguments

  • details=false : If true, returns (x,res,L) where x is the PageRank vector, res is the power method detailed results structure, L is the linear operator that the power method finds the eigenvector of; if false, returns x.

  • See powermethod! for other keyword arguments

source
IsoRank.powermethod!Function.
powermethod!(A, x, Ax=similar(x);
             <keyword arguments>) -> radius, x, [log/history]

Performs power method in order to find the dominant eigenvector of the linear operator A. Eigenvector is normalized w.r.t. L_1 norm. Modifies initial eigenvector estimate x.

Arguments

  • A : linear operator

  • x : initial estimate of the eigenvector, not necessarily normalized

  • Ax : scratch space for the iteration process

Keyword arguments

  • maxiter : maximum # of iterations

  • tol=eps(Float64) * size(A,2) : error tolerance in L_1 norm

  • log=true,verbose=true : logging and printing

source
IsoRank.kronlmFunction.
kronlm([T], A, B)

Kronecker product of A and B, stored as a linear operator (from LinearMaps.jl) so that you don't have to create the actual matrix, i.e. kronlm(A,B)*x == kron(A,B)*x. This is much faster than directly creating the matrix: O(|V|^2+|V||E|) instead of O(|V|^2 + |E|^2) for each step of the power iteration where |V| and |E| are the number of nodes and edges in the graphs.

Arguments

  • A,B : linear operators with multiply and transpose operations

  • T : element type of the resulting linear operator

source