bb_plot_blast_hits_txt - ampinzonv/BB3 GitHub Wiki

Function: bb_plot_blast_hits_txt

Visualize BLAST high-scoring pair (HSP) alignments as scaled ASCII bars.


๐Ÿ” Description

This function generates a plain-text graphical representation of BLAST alignments using = symbols. Each line shows the alignment of a subject sequence to a query, scaled to a fixed width, and includes basic alignment metadata.


๐Ÿ“ฅ Input

  • A BLAST output file in format 6 with 14 columns (must include qlen and slen).
  • Use --input - for STDIN.

๐Ÿ“ค Output

  • ASCII-formatted chart printed to screen or saved to file.

๐Ÿงช Examples

Visualize all hits:

bb_plot_blast_hits_txt --input blast_results.tsv

Limit to top 5 hits:

bb_plot_blast_hits_txt --input blast_results.tsv --top_hits_number 5

Save to file:

bb_plot_blast_hits_txt --input blast_results.tsv --outfile plot.txt

โš™๏ธ Usage

bb_plot_blast_hits_txt --input FILE [--top_hits_number N] [--outfile FILE] [--quiet] [--force]

๐Ÿงต Options

Option Description
--input FILE BLAST outfmt 6 file with 14 columns, or - for STDIN (required)
--top_hits_number N Number of top hits (by bitscore) to include in the plot
--outfile FILE Output file (default: STDOUT)
--quiet Suppress messages
--force Overwrite existing output file

๐Ÿ“Œ Notes

  • Useful for inspecting BLAST hit coverage visually.
  • Requires bb_blast_best_hit to be available in your environment.