ncbi blast results in multi-sequence fasta file
1
0
Entering edit mode
7.9 years ago
a.rex ▴ 350

I have a fasta file that has 1000s of sequences, i.e.:

>loc.1 
ATGGTTTTTCCGTATACTTCACTGACTGCTGCTTGTAATTTTTCAGCATCCTCAAATTTTCAATTGTCAGAAACATGTCTAAACAATGAGGTCCCTCCAGTATTTATAAATAGCAACGGCCAAAATTGTTCCCGGCCCAATATGTCTTATAATGCTGACTTTCAAGTTTCAAATAGTCATTGTAATGAAACCACTGACAGTATTGGTAGTGGTCAAAATACTACTACTGATATGAATTACGATCCAAATAATAGTCAGAACTTTTCATTTTCCTCAAATGTTCTTGGTAATCTACAAAACTGGAATGGTAAAAGATCTAATTATTTCAGTTACAAACTCAATGACATGAAACAATTTTATAATCAAGAAATACCGTTAGTGGACAATTCCGTACCGATTTACACAAATGG
>loc.2 
  CAGGTAAAAATCTGGTTTCAAAATCGTCGGTCCAAGTATAAAAAGCTTATTAAGCAAGGTCAGGATCCAAGCATCCTGATGAATGGAGAATTTAATGACAGCATGGATGAAATGACGGAAGATCAAATCGACGAAGATAATTGTATCAAACCAAAAGCAGAAATGCTATTAACAAGCGATCCAAATAATCCTAGAGGCGATAGTTCTGATATTCCAACTGAAA

I am using ncbi blastn in terminal against this file to search for a sequence of interest. However, I simply want to print out the top 5 hits. Instead, it goes through each locus id and makes an alignment. How can I do this easily - there does not seem to be any options available in blastn to give only the best scoring hits in a multi-sequence file?

blast ncbi • 1.9k views
ADD COMMENT
1
Entering edit mode

Blast options should apply to each search individually. Is -num_descriptions 5 -num_alignments 5 not working? How did you make your index (using the file example you have posted)? Are you using blast 2 sequences instead of blastn?

ADD REPLY
1
Entering edit mode
7.9 years ago
Sej Modha 5.3k

You can customise the number of alignments by customising following parameters in BLASTN output.

-num_descriptions <Integer, >=0>
   Number of database sequences to show one-line descriptions for
   Not applicable for outfmt > 4
   Default = `500'
    * Incompatible with:  max_target_seqs
 -num_alignments <Integer, >=0>
   Number of database sequences to show alignments for
   Default = `250'
    * Incompatible with:  max_target_seqs
  
ADD COMMENT

Login before adding your answer.

Traffic: 1892 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6