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.
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"
You can also search for / retrieve particular entries with -entry or -entry_batch:
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
Input file for batch processing (Format: one entry per line, seq id
followed by optional space-delimited specifier(s)
* Incompatible with: entry, range, strand, mask_sequence_with, pig, info,
list, recursive, remove_redundant_dbs, list_outfmt,
But it allows me to search by accession number is there any way where i can search by name or length of sequence.
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"
But that will give me only the line containing that word not the sequence.Is there any command for that in blast+ tool.
Login before adding your answer.
Use of this site constitutes acceptance of our User Agreement and Privacy