Skip to content

CLI Reference

FastQTools exposes only a small set of core CLI concepts: global logging options, the stat subcommand, and the filter subcommand. The interface stays intentionally narrow so the command line remains scriptable, reproducible, and maintainable as the external boundary.

Command structure

bash
FastQTools [global options] <subcommand> [subcommand options]

One important rule is that global options come before the subcommand. If you need to adjust the log level, write it like this:

bash
FastQTools --log-level debug stat -i reads.fastq.gz -o stats.txt

Global options

OptionPurposeTypical use
-v, --verboseIncrease log detailTroubleshooting and local validation
-q, --quietKeep only error outputBatch jobs and CI
--log-level <level>Set the log level explicitlyStable automation and scripting
--helpShow help outputFirst use and parameter confirmation

stat: statistics and evidence building

stat does not modify the input. Its job is to interpret the data as comparable, traceable quality evidence.

bash
FastQTools stat -i reads.fastq.gz -o stats.txt
FastQTools stat -i reads.fastq.gz -o stats.txt -t 8
FastQTools stat -i reads.fastq.gz -o stats.txt \
    --signature-report signatures.tsv \
    --signature-kmer-size 15

You would typically call it when you want to:

  • inspect read length, GC, Q20/Q30, and quality distribution quickly;
  • establish a baseline before filtering instead of tuning by guesswork;
  • leave behind an auditable statistics output inside an automated workflow.

filter: filtering, trimming, and preprocessing

filter turns policy into actual output. Its options are easiest to think about in three groups:

Parameter groupRepresentative optionsMeaning
Input / output-i, -o, -tSelect files and concurrency
Filtering rules--min-quality, --min-length, --max-n-ratioDefine which reads are kept
Trimming rules--trim-quality, --trim-mode, --adapter-seq, --trim-poly-g, --trim-poly-xDefine how retained reads are changed

Example:

bash
FastQTools filter -i reads.fastq.gz -o clean.fastq.gz \
    --min-quality 20 \
    --min-length 50 \
    --max-n-ratio 0.1 \
    --trim-quality 20 \
    --trim-mode both

Look at statistics before deciding on filtering

bash
FastQTools stat -i reads.fastq.gz -o stats.txt
FastQTools filter -i reads.fastq.gz -o clean.fastq.gz --min-quality 20 --min-length 50

Let automation own log control

bash
FastQTools --log-level error filter -i reads.fastq.gz -o clean.fastq.gz --min-quality 20

Keep sidecar evidence

bash
FastQTools stat -i reads.fastq.gz -o stats.txt --signature-report signatures.tsv

Relationship between CLI and API

The CLI is the most direct engineering interface the project exposes. If you need to embed the capability into a C++ application instead of invoking it through the shell, continue to API Overview and Developer Architecture.

MIT License © LessUp