bb_blast_summary - ampinzonv/BB3 GitHub Wiki

Function: bb_blast_summary

Generate summary statistics from a BLAST tabular file (outfmt 6 with 14 columns).


๐Ÿ” Description

This function computes and prints summary statistics from a BLAST result file. It includes metrics such as average identity, query and subject coverage, number of queries with hits, and proportion of significant hits.


๐Ÿ“ฅ Input

  • A BLAST file in tabular format (outfmt 6) with 14 columns including qlen and slen.
  • Can read from a file or from STDIN with --input -.

๐Ÿ“ค Output

  • A textual report with alignment and coverage statistics.

๐Ÿงช Examples

Basic summary:

bb_blast_summary --input blast_results.tsv

From a pipe:

cat blast_results.tsv | bb_blast_summary --input -

Redirect summary to a file:

bb_blast_summary --input blast_results.tsv --outfile summary.txt

โš™๏ธ Usage

bb_blast_summary --input FILE [--outfile FILE] [--quiet] [--force]

๐Ÿงต Options

Option Description
--input FILE BLAST outfmt 6 file with 14 columns or - for STDIN (required)
--outfile FILE Output file (default: STDOUT)
--quiet Suppress informational messages
--force Overwrite output file if it exists

๐Ÿ“Œ Notes

  • Coverage is calculated using qstart, qend, qlen and similarly for subject.
  • A hit is considered significant if evalue <= 1e-5.
  • Includes a section with the top 5 queries that have the most hits.