bb_plot_histogram_txt - ampinzonv/BB3 GitHub Wiki
bb_plot_histogram_txt
Function: 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.