Question: Searching blast+ local database
0
gravatar for jeevansai502
2.1 years ago by
jeevansai5020 wrote:

I am creating a local blast database using blast+ command line tool ,is there any command so that i can search for a sequence in my database using accession id or name.

blast+ blast • 1.2k views
ADD COMMENTlink modified 2.1 years ago by genomax73k • written 2.1 years ago by jeevansai5020
1
gravatar for genomax
2.1 years ago by
genomax73k
United States
genomax73k wrote:

Use blastdbcmd with your local database. Adjust outfmt. Use %a if you just need to see accession number.

blastdbcmd -db your_database_name -entry your_accession_of_interest -outfmt "%f"
ADD COMMENTlink modified 2.1 years ago • written 2.1 years ago by genomax73k

You can also search for / retrieve particular entries with -entry or -entry_batch:

 -entry <String>
   Comma-delimited search string(s) of sequence identifiers:
    e.g.: 555, AC147927, 'gnl|dbname|tag', or 'all' to select all
    sequences in the database
    * Incompatible with:  entry_batch, pig, info, list, recursive,
   remove_redundant_dbs, list_outfmt, show_blastdb_search_path
 -entry_batch <File_In>
   Input file for batch processing (Format: one entry per line, seq id 
   followed by optional space-delimited specifier(s)
   [range|strand|mask_algo_id]
    * Incompatible with:  entry, range, strand, mask_sequence_with, pig, info,
   list, recursive, remove_redundant_dbs, list_outfmt,
   show_blastdb_search_path
ADD REPLYlink written 2.1 years ago by h.mon27k

But it allows me to search by accession number is there any way where i can search by name or length of sequence.

ADD REPLYlink modified 2.1 years ago • written 2.1 years ago by jeevansai5020

It may be possible to search the sequence by "name" (though you will need to define what you mean by that, I assume some word in the fasta header). You can't search by length (unless you had that information in your fasta headers).

blastdbcmd -db your_database_name -entry all -outfmt "%f" | grep "word_in_title"
ADD REPLYlink modified 2.1 years ago • written 2.1 years ago by genomax73k

But that will give me only the line containing that word not the sequence.Is there any command for that in blast+ tool.

ADD REPLYlink written 2.1 years ago by jeevansai5020
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 865 users visited in the last hour