bb_plot_histogram_txt - ampinzonv/BB3 GitHub Wiki

Function: bb_plot_histogram_txt

Draw a horizontal histogram using two-column input data.


๐Ÿ” Description

This function creates a plain-text horizontal bar chart. It expects two columns: labels and values. Optionally, values can be log-transformed.


๐Ÿ“ฅ Input

  • A two-column file with label and value pairs.
  • Use --input - to read from STDIN.

๐Ÿ“ค Output

  • ASCII-style histogram with scaled bars.


๐Ÿงช Examples

Basic plot:

bb_plot_histogram_txt --input values.tsv

Custom bar character and log scaling:

bb_plot_histogram_txt --input values.tsv --char '#' --log 10

Save plot to file:

bb_plot_histogram_txt --input values.tsv --outfile plot.txt

โš™๏ธ Usage

bb_plot_histogram_txt --input FILE [--outfile FILE] [--char SYM] [--log N] [--quiet] [--force]

๐Ÿงต Options

Option Description
--input FILE Input file (2 columns) or - for STDIN (required)
--outfile Output file (optional, default: STDOUT)
--char Character to use for bars (default: =)
--log Apply log base N to values before plotting
--quiet Suppress messages
--force Overwrite existing output file

๐Ÿ“Œ Notes

  • Useful for summarizing coverage, quality scores, or hit frequencies.