bbuchfink / diamond

Accelerated BLAST compatible local sequence aligner.
GNU General Public License v3.0
1.06k stars 182 forks source link

Diamond blastx not aligning to ref #341

Closed bochaozhang closed 4 years ago

bochaozhang commented 4 years ago

Hi,

I am trying to align a query NT sequence against a ref AA sequence using blastx.

query sequence: AGGGCCTACCTGGAGGGCACGTGCGTGGAGAGGCTCGCAGACACCTGGAGAACGGGAAGGAGACGCTGCAGCTCACGGGT

ref sequence: SHTIQMMYGCDVGSDGRFLRGYQQDAYDGKDYIALNEDLRSWTAADMAAQITQRKWEAARVAEQLRAYLEGTCVERLRRYLENGKETLQRTD

The query sequence can be translated to RAYLEGTCVERLADTWRTGRRRCSSR with 5'3' Frame 1, and the first 11 amino acid RAYLEGTCVER can be found in the reference sequence at 66 to 77.

However when I ran Diamond blastx using this command it reports 0 aligned. diamond blastx --masking 0 --top 1 --algo 0 --max-hsps 1 --min-score 1 -k 0 --id 99 -c 1 -d ref.dmnd -q query.fasta -o alignment.m8

Reported 0 pairwise alignments, 0 HSPs. 0 queries aligned.

Can you let me know why the query sequence is not aligned please? Thanks.

bbuchfink commented 4 years ago

Try using --more-sensitive. It worked for me like that.

bochaozhang commented 4 years ago

Thanks a lot! It worked. Do you mind elaborating on the differences between with and without --more-sensitive option? I'm curious how it changed the behavior. Thanks.

bbuchfink commented 4 years ago

Diamond uses shorter seeds with that option, in default mode the seeds are too long to detect an exact 11 letter match (this is due to the use of spaced seeds).

bochaozhang commented 4 years ago

That makes sense. Thanks!