amplab实验室的SNAP算法运行和操作:
环境:ubuntu14.04
1.安装:
参考【1】和【2】,需要:
sudo apt-get install g++ sudo apt-get install zlib1g-dev
2.编译:在snap目录下运行make
3.操作:
(1)构建参考基因的索引:
./snap-aligner index tests/datatest/datatest.fa index1运行结果:
hadoop@Mcnode1:~/cloud/adam/xubo/snap$ ./snap-aligner index tests/datatest/datatest.fa index1 Welcome to SNAP version 1.0beta.22. Hash table slack 0.300000 Loading FASTA file 'tests/datatest/datatest.fa' into memory...0s Saving genome...0s Computing bias table. Bias computation: 0 / 1202 Computed bias table in 0s Allocating memory for hash tables...0s Building hash tables. 0(0%) seeds occur more than once, total of 0(0%) genome locations are not unique, 498(41%) bad seeds, 0 both complements used 500 no string Hash table build took 0s Building overflow table. Overflow table build and hash table save took 0s Saving overflow table...0s Index build and save took 0s (1202 bases/s)
(2)比对:
单端比对:
./snap-aligner single index1 tests/datatest/datatest.fq -o output.sam
hadoop@Mcnode1:~/cloud/adam/xubo/snap$ ./snap-aligner single index1 tests/datatest/datatest.fq -o output.sam Welcome to SNAP version 1.0beta.22. Loading index from directory... 0s. 1202 bases, seed size 20 Aligning. Total Reads Aligned, MAPQ >= 10 Aligned, MAPQ < 10 Unaligned Too Short/Too Many Ns %Pairs Reads/s Time in Aligner (s) 2 2 (100.00%) 0 (0.00%)
./snap-aligner paired index1 tests/datatest/datatest.fq tests/datatest/datatest.fq -o output2.sam
运行结果:
hadoop@Mcnode1:~/cloud/adam/xubo/snap$ ./snap-aligner paired index1 tests/datatest/datatest.fq tests/datatest/datatest.fq -o output2.sam Welcome to SNAP version 1.0beta.22. Loading index from directory... 0s. 1202 bases, seed size 20 Aligning. Total Reads Aligned, MAPQ >= 10 Aligned, MAPQ < 10 Unaligned Too Short/Too Many Ns %Pairs Reads/s Time in Aligner (s) 4 4 (100.00%) 0 (0.00%) 0 (0.00%) 0 (0.00%) 0.00%% 1,000 0
4.其他:snap文件夹下的docs有教程
参考文献:
【1】 https://github.com/amplab/snap
【2】 http://snap.cs.berkeley.edu/