以前にBAPSを取り上げたが、その後全く使わず。
気づけばMACuserに転向し、WindowsでBAPSを使うことの無意味さを次第に感じる今日この頃。
というわけで、特段使う予定もないが、いつかはきっと役に立つBAPSを改めて参照してみた。
Installはクソ簡単。websiteに書いてある通りにやってください。
MATLABはBAPS5.4のzip.パッケージ内に含まれています。
以下に、hierBAPSのreadme.txtを添付します。
まだやってないけど、このままやればできるはず。
1. Launch X11 terminal app, go to the folder containing hierBAPS files and type
./run_exData.sh /Applications/MATLAB/MATLAB_Compiler_Runtime/v713/ seqs.fa fasta
This will produce an input file called "seqs.mat" from your alignment file. The example file seqs.fa is provided with this readme file.
2. Type
./run_hierBAPS.sh /Applications/MATLAB/MATLAB_Compiler_Runtime/v713/ seqs.mat L maxK results
注意!ここのLどうやって決めるんや!?
(http://onlinelibrary.wiley.com/doi/10.1111/j.1365-294X.2005.02553.x/full)
によるとSTRUCTUREというソフトで推定できる。
This will launch hierBAPS. Clustering is performed with L levels in the hierarchy and maxK is the prior upper bound for number of clusters. As in BAPS, hierBAPS will estimate the maximum a posteriori partition (MAP) with the number of clusters in the interval 1 to maxK. hierBAPS will save an output file named results.mat (binary format) and a partition file "results.partition.txt", where each column represents the MAP partion of that layer.
3. (optional) Assume you did use
./run_hierBAPS.sh /Applications/MATLAB/MATLAB_Compiler_Runtime/v713/ seqs.mat 2 20 results
In the previous step. You can continue the clustering from the previous result to a deeper level (here L=4) by typing
./run_hierBAPS.sh /Applications/MATLAB/MATLAB_Compiler_Runtime/v713/ results.mat 4 20 results2nd
4. Type
./run_drawSnpMat.sh /Applications/MATLAB/MATLAB_Compiler_Runtime/v713/ results.mat shuffle
This will draw a SNP matrix with rows and columns shuffled as shown in BAPS 6.0 manual. Without the "shuffle" parameter, the columns will not be shuffled. Consequtive rows between horizontal black lines represent a 1st layer cluster.
A tab delimited file "figInfo.txt" will also be produced.