← 返回命令列表

Linux command

blastdbcmd 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Get database information

blastdbcmd -db [nr] -info

List available databases

blastdbcmd -list [/path/to/databases] -recursive

Extract a sequence

blastdbcmd -db [nr] -entry [NP_001234] -out [sequence.fasta]

Extract all sequences

blastdbcmd -db [swissprot] -entry all -out [swissprot.fasta]

Extract sequences

blastdbcmd -db [nr] -entry_batch [ids.txt] -out [sequences.fasta]

Get sequence in specific format

blastdbcmd -db [nr] -entry [NP_001234] -outfmt "%a %t %s"

Show BLAST database search path

blastdbcmd -show_blastdb_search_path

Get taxonomy information

blastdbcmd -db [nr] -entry [NP_001234] -outfmt "%a %S %T"

说明

blastdbcmd is a utility for extracting sequences and metadata from BLAST databases. It can retrieve individual sequences by accession, extract all sequences, display database statistics, and generate custom reports. The tool is part of the NCBI BLAST+ suite and works with databases created by makeblastdb or downloaded from NCBI.

参数

-db _name_
BLAST database name or path
-entry _id_
Sequence identifier(s) to retrieve; use "all" for entire database
-entry_batch _file_
File containing list of sequence identifiers
-out _file_
Output file (default: stdout).
-outfmt _format_
Custom output format string using % tokens.
-info
Display database information (type, number of sequences, total length, date).
-list _path_
List databases in specified path.
-recursive
Search directories recursively (with -list).
-show_blastdb_search_path
Display BLAST database search paths.
-dbtype _type_
Database type: nucl (nucleotide) or prot (protein). Needed when both types share a name.
-target_only
Retrieve only target sequences (no redundant group members).
-tax_info
Display taxonomy information (requires taxonomy database).
-range _start-stop_
Extract subsequence range (1-based, inclusive).
-strand _strand_
Strand to retrieve: plus or minus (nucleotide only).
-line_length _N_
Line length for FASTA output (default: 80). Use 0 for single-line sequences.
-long_seqids
Use long sequence identifiers including database and accession.version.

FAQ

What is the blastdbcmd command used for?

blastdbcmd is a utility for extracting sequences and metadata from BLAST databases. It can retrieve individual sequences by accession, extract all sequences, display database statistics, and generate custom reports. The tool is part of the NCBI BLAST+ suite and works with databases created by makeblastdb or downloaded from NCBI.

How do I run a basic blastdbcmd example?

Run `blastdbcmd -db [nr] -info` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -db _name_ do in blastdbcmd?

BLAST database name or path