so iam performing a standalone blast= execution for aligning mus musculus genes
i use the command line
./blastn -query /home/Downloads/esembl/EDL36652.1d.fasta -db /home/Desktop/ncbi-blast-2.2.30+/output2/mart -outfmt 7 -out /home/Desktop/ncbi-blast-2.2.30+/outformat/result
what additional commands do i need to supply to restrict the number of hits to 10
anyone got suggestions
edit
okay so tried the cmd line
./blastn -query /home/Downloads/esembl/EDL36652.1d.fasta -db /home/Desktop/ncbi-blast-2.2.30+/output2/mart -outfmt 7 -max_target_seqs 1 -out /home/Desktop/ncbi-blast-2.2.30+/outformat/result
but i still get 31 hits and i cant go below 1
Hello,
It is possible that
-max_target_seqs
works only with some output format. Could you try with-outfmt 6
?No can do. For my purposes using a
-outfmt 6
if I believe correctly doesn't display genes with no hits when I use multiple files-outfmt 7
is more suitedWhy not consult the manual?
Since you are using
outfmt 7
,-max_target_seqs
is the correct option to restrict the number of hits you want to see in the output. Now, is it possible that the multiple "hits" you are seeing are HSPs belonging to a single subject sequence? Can you post few lines from your BLAST output?BLAST OUTPUT FOR THE FIRST GENE OUT OF 4 RUN AS CONCATENATED FILES
Yes, these are HSPs from one subject sequence (same subject IDs in the second column). I checked the query and subject IDs. You are using a huge query sequence ( 88,119,379 bp) and searching against a database that contains one huge subject sequence (69,831 bp). Since BLAST is a local alignment tool, it is going to find several HSPs between these huge query and subject sequences. I don't know what your goal here is. If you really want only one HSP per subject, set the option
-max_hsps
to 1.Well when we performed the analysis we got over 3000 hits, and we were resolved for selecting the best hits , low E value, high bit value, max alignment and such . so restricting the number of displayed hits to 10 would have been more convenient
We were using
outfmt 7
because it suited our needs, and I tried your suggestion even atmax_hsps 1
I get around 239 hits, whilemax_target_seqs
1 gave around 31 hits or soDid you use both
-max_target_seqns
and-max_hsps
and set them to 1?Setting
-max_target_seqns
to 1 will give only 1 subject/hit but several HSPs if they are present.Setting
-max_hsps
to 1 will give only 1 HSP per subject but for all subject/hits in the database.Use them together to get only 1 HSP from 1 hit.