bb_plot_quality_distribution - ampinzonv/BB3 GitHub Wiki

Function: bb_plot_quality_distribution

Plot ASCII histogram of average quality per read from a FASTQ file.


๐Ÿ” Description

This function computes the average quality score per read and groups them into bins (e.g. 0โ€“9, 10โ€“19, etc.). The distribution is displayed as an ASCII histogram.


๐Ÿ“ฅ Input

  • A FASTQ file or --input - to use STDIN.
  • Gzip-compressed .fastq.gz files are supported.

๐Ÿ“ค Output

  • Histogram showing how many reads fall into each average quality range.


๐Ÿงช Examples

Use default sampling:

bb_plot_quality_distribution --input reads.fastq

Sample 30% and save plot:

bb_plot_quality_distribution --input reads.fastq --sample_size 30 --outfile plot.txt

Specify Phred offset:

bb_plot_quality_distribution --input reads.fastq --phred_offset 64

โš™๏ธ Usage

bb_plot_quality_distribution --input FILE [--sample_size PCT] [--phred_offset N] [--outfile FILE] [--quiet] [--force]

๐Ÿงต Options

Option Description
--input FILE FASTQ file or - for STDIN (required)
--sample_size PCT Percentage of reads to sample randomly (optional)
--phred_offset N ASCII offset for quality encoding (default: 33)
--outfile FILE Output file (default: STDOUT)
--quiet Suppress informational messages
--force Overwrite output file if it exists

๐Ÿ“Œ Notes

  • Output bins include ranges: 0โ€“9, 10โ€“19, 20โ€“29, ... up to 60โ€“69.
  • A quick way to inspect general sequencing quality across reads.