3
$\begingroup$

I'm using this command (excuse the duplicate naming, I know it's bad form):

blastn -query cm-seqs/combined_seqs.fna -db combined_seqs.fna -out cm-matched.txt -num_alignments 1 -outfmt 10

to take a set of fasta sequences to blast against another data base I built with blast.

My query file has 4,364,417 sequences. The files resulting from the above command spat out 4,362,639 results. The difference is about 1800. Is this due to poor alignments for some sequences that didn't pass any of blasts default parameters? I assumed the result would be 1 "best" match in the database for each query sequence.

$\endgroup$
1
  • $\begingroup$ -num_alignments 1 is not appropriate for that output format i think, try -max_target_seqs 1 $\endgroup$ Commented Apr 30, 2018 at 14:37

1 Answer 1

1
$\begingroup$

Yes, if a query sequence has no good alignment, blast will not return a result for it. Your command will indeed output only the best hit for each query sequence, but there is no reason to assume all of your sequences will have a match.

Those that don't have a match won't be included in the output. This sounds perfectly normal unless you are blasting the same input file against a DB created from that file. Otherwise, you don't expect all of your sequences to necessarily have a match.

Also note that since the default blastn settings are quite permissive (usually an e-value of 10, for example), don't make the mistake of assuming that a blast hit means anything. The details will always depend on the specific search you are running (I have discussed this a little in my answer here), but in the vast majority of cases, any hit with an e-value > 1 can safely be ignored. In most cases, you are only interested in e-values well under 1, actually. So you probably already have all sorts of spurious results in there anyway.

For more details, please edit your question and explain what the query and DB files are.

$\endgroup$
2
  • $\begingroup$ Great! That was a perfect response. $\endgroup$ Commented May 2, 2018 at 12:16
  • $\begingroup$ The databases I created were the bacterial 16S metagenome of an additive, and the 16S metagenomic community of our experimental subject during the experiment. The microbiome of the subjects were blasted against the additive to track what in the additive was able to persist in a foreign environment. $\endgroup$ Commented May 2, 2018 at 12:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.