Skip to main content

Crate whittle

Crate whittle 

Source
Expand description

whittle: coordinate-consistent trimming of long-read uBAM and tagged FASTQ.

run is the library entry point; cli::parse builds its Config.

Re-exports§

pub use config::Config;

Modules§

adapter
Adapter, primer and barcode trimming.
cli
Command-line parsing: the clap definition, cross-flag validation, and construction of the resolved Config.
config
Resolved run configuration: Config, tag carry-through policy, adapter-inference settings, progress mode, and the thread budget.
filter
Post-trim segment filtering by length, quality, expected errors and GC fraction.
io
Input and output format detection, and the FASTQ, BAM and directory readers.
mods
Base-modification (MM/ML) parsing, windowing and serialization.
obs
Observability: leveled logging (tracing) and progress reporting (indicatif).
qual
Phred-scale quality summaries for a read: error-probability mean, arithmetic mean and median.
record
The format-neutral read record shared by the FASTQ and BAM workflows.
summary
Machine-readable run summary (--summary-json).
tagfilter
Read selection by an expression over SAM aux tags: the --tag-filter grammar, its parser and an evaluator over any record type that can look up a tag.
trim
Adapter trimming and splitting, barcode restriction, per-segment cropping and quality processing, expressed as intervals in the original read.
workflow
Workflow drivers shared by the FASTQ and BAM paths: batching, the parallel driver, run counters and per-read segment filtering.

Functions§

command_line
Joins the process argv into one shell-quoted line that can be copied and re-run. Takes OsStr-like items (args_os(), not args(), which panics on non-UTF-8 argv) and converts them lossily here, the one seam that must not panic on a malformed argv. Generic over the iterator so tests supply their own argv.
run
Runs one trimming job. A directory input selects folder-merge mode (every read file in it is merged into one output); any other input is a single file or stdin. FASTQ and unaligned BAM are supported.