Motif clustering based on snap. (snap.stanford.edu/higher-order)

1. successful compiling of motif clustering (snap/example/motifcluster/) needs a lot of steps and libraries.

 

Os: Ubuntu linux 12.04 desktop 64bit

 

1> Install g++

 

Sudo get-apt…

 

2>Install gfortran and fortran77

 

Sudo get-apt gfortran

 

Note: fortran77 is optional because gfrotran can complile fortran77 code as well. But you need to modify the ARmake.inc file in the root directory of arpack to specify your complier.

 

3>Install blas

           

            Download from www.netlib.org/blas/

           

            In the BLAS root directory, run make command, get .a files

 

            Mv blas_LINUX.a  libplas.a

 

            Sudo cp libblas.a /usr/lib/

 

            Note: 1. .a is static library while .so is dynamic library

2. After you put a libxxx.a file into /usr/lib/, suffix “-lxxx” can be used while compiling.

 

4>Install lapack

 

            Download from www.netlib.org/lapack/

           

            In the lapack root directory, run make command, get liblapack.a files

 

            Sudo cp liblapack.a /usr/lib/

 

5>Install arpack

            Download: www.caam.rice.edu/software/ARPACK/

            First, modify the ARmake.inc file. Especially “home”, where to generate the lib file, the lib’s name, the complier you want to use (f77 by default) and the directory that make lies in. The default directory of make in the os is different from the default value.

 

            Second, modify the second.f in UTIL if needed. (I haven’t)

 

            Third, run “make lib” in the top directory of arpack to get a libxxxx.a

 

            Fourth, “cp libxxxx.a /usr/lib/”

 

            You are all set.

 

6>Compile motifcluster

 

            Run “make” in the directory “SNAPHOME/example/motifcluter/” to get executable “motifclutermain”.

 

7>Run it

 

            ./motifclustermain -i: C-elegans-frontal.txt -m:bifan

 

            Note: -i: input file, -m: motif pattern

 

            # look the result

            Cat C-elegans-frontal-bifan-cluster.txt

 

            Note: the first group of integers is the cluster of most importance. Can be used to get a group of members that are most interesting.

            Python get_names.py C-elegans-frontal-meta.csv

 

            Note: to get the name of the nodes in the cluster

 

2. about the paper

 

1> I think the explaination of value vol(S) is very misleading. It should be the sum of degrees of all the nodes that reside in S.

 

2>the algorithm is to find one partition of the s list, an ordered list got from the normalized Laplacian of the motif adjacency matrix, so that the conductance of the partition is the smallest. The smaller group is the cluster we need.

 

           

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章