參考文章http://www.biotrainee.com/thread-1465-1-1.html http://blog.sina.com.cn/s/blog_83f77c940102vny3.html
1. 下載、安裝
下載地址:https://github.com/bbuchfink/diamond
$ tar xzf diamond-linux64.tar.gz
2. 使用
建立索引
$ diamond makedb --in nr.faa -d nr
比對:
$ diamond blastx -d nr -q reads.fasta -o matches.m8 --sensitive
-b 16.0 -e 1e-5
-q:可以是fasta或fastq(可以是壓縮的)
--taxonmap :后接文件,蛋白質accession 號對應的物種id,下載地址:ftp://ftp.ncbi.nlm.nih.gov/pub/taxonomy/accession2taxid/prot.accession2taxid.gz
--sensitive:比對長片段
--more-sensitive:比對長片段
--outfmt/-f:0 BLAST pairwise format
5 BLAST XML format
6 BLAST tabular format (默認) ,可以自己設置,與blast+相似,如:--outfmt '6 qseqid qlen sseqid slen pident length mismatch gapopen qstart qend sstart send evalue bitscore staxids'
默認: qseqid sseqid pident length mismatch gapopen qstart qend sstart send evalue bitscore
100 DIAMOND alignment archive (DAA)
101 SAM format
--max-target-seqs/-k:最大比對輸出數,默認25,(1,則輸出最好的那個)
--evalue/-e:默認0.001
--block-size/-b :使用內存,默認值2.0則為12G,
--threads/-p:CPU線程數,默認使用所有的