bb_run_blast - ampinzonv/BB3 GitHub Wiki

Function: bb_run_blast

Run a BLAST search using a query file and an existing database. Supports automatic detection of query type and validation of compatible BLAST types.


🧬 Description

This function runs a BLAST search (e.g., blastn, blastp) using a provided query FASTA file and a BLAST-formatted database. It validates compatibility between the query type and the database type, supports multi-threading, and provides useful feedback and error handling.


🧾 Usage

bb_run_blast --input FILE --db PREFIX --blast_type TYPE [--outfile FILE|DIR] [--processors N] [--strict] [--quiet] [--force]

🧵 Options

Option Description
--input FILE Query FASTA file (required)
--db PREFIX Prefix of the BLAST database (required)
--blast_type One of blastn, blastp, blastx, tblastn, tblastx (required)
--outfile Output file or directory (default: <query>.blastout)
--processors Number of CPU threads (default: 1)
--strict Return an error if no hits are found
--quiet Suppress informational messages
--force Overwrite output file if it exists

💡 Notes

  • The input and database types are auto-detected using bb_guess_sequence_type and bb_guess_db_type.
  • Output format is fixed as BLAST tabular (outfmt 6) with 14 columns.

🧪 Example

bb_run_blast --input query.fasta --db mydb --blast_type blastn --outfile results/blast.out --processors 4
⚠️ **GitHub.com Fallback** ⚠️