compBijection {simulatorAPMS} | R Documentation |
This function takes a similarity measure matrix between the ISI and some estimate and finds the maximal value of this matrix. It aligns the complex indexed by the row and the complex indexed by the column and deletes the row and colunm and recursively calls itself on the new matrix. It stops when there are either no rows left or no columns left. The function breaks ties by comparing complex size and taking the larger complexes.
compBijection(TSNMat, estMat, c2kMatrix, bijMat, counter = 1)
TSNMat |
matrix for bipartite graph for ISI |
estMat |
matrix for bipartite graph of the estimate |
c2kMatrix |
similarity matrix; e.g, Jaccard |
bijMat |
matrix that will store the alignment and the similarity between the two complexes |
counter |
keeps tracks of the number of complexes aligned |
This function tries to create a maximal alignment. It will use the minimum number of complexes (either the number of complexes in ISI or the estimate) as the number of complexes to align. This number varies from estimate to estimate, so the number of rows in bijMat must vary accordingly. Therefore, the runAlignment() function must be called first to set up BijMat.
Matrix: where each row gives the alignment between ISI and estimate and the corresponding similarity index.
Tony Chiang
library(simulatorAPMS) data(simEX) data(APComEX) CC = runCompareComplex(simEX, APComEX) JC = JaccardCoef(CC) runAlignment(simEX, APComEX, JC)