bb_create_blast_db - ampinzonv/BB3 GitHub Wiki

Function: bb_create_blast_db

Create a BLAST database from a FASTA file using makeblastdb.


๐Ÿ” Description

This function generates a BLAST database from a given FASTA file. It automatically detects whether the sequences are nucleotide or protein and uses that to configure makeblastdb.


๐Ÿ“ฅ Input

  • A FASTA file with nucleotide or protein sequences.

๐Ÿ“ค Output

  • A set of files forming a BLAST database (e.g., .nsq, .nin, .nhr or .psq, .pin, .phr).

๐Ÿงช Examples

Create a nucleotide database:

bb_create_blast_db --input genome.fasta

Create a protein database in a custom directory:

bb_create_blast_db --input proteins.fasta --outdir blastdb/ --db_name mydb

Dry run (show command only):

bb_create_blast_db --input sequences.fasta --dry_run

โš™๏ธ Usage

bb_create_blast_db --input FILE [--outdir DIR] [--db_name NAME] [--title TITLE] [--dry_run] [--quiet] [--force]

๐Ÿงต Options

Option Description
--input FILE Input FASTA file (required)
--outdir DIR Output directory (default: current directory)
--db_name NAME Name of the BLAST database (default: derived from input file name)
--title TITLE Human-readable title (default: derived from input)
--dry_run Print the command instead of executing it
--quiet Suppress informational messages
--force Overwrite existing database files

๐Ÿ“Œ Notes

  • The function uses bb_guess_sequence_type to auto-detect if the database is nucleotide or protein.
  • Compatible with downstream functions like bb_run_blast.