Repository navigation
Unaligned BAM support, poly(A) tail trimming, a leaner dependency tree
and faster gzip decompression. FASTQ output is byte-identical to v0.14.1
for valid input.
Unaligned BAM in and out (#79, #84)
- chopper now reads unaligned BAM, the default output of dorado and other
ONT basecallers, from a file or stdin. The format is detected
automatically, and output is written in the same format as the input. --output-format fastq|bamconverts between them. BAM to FASTQ writes
every tag after the read name, likesamtools fastq -T '*'. FASTQ to
BAM turns those fields back into typed tags.- uBAM to uBAM keeps every tag with its exact type and order, and passes
the header through with a@PGline added for chopper.--update-mods
rewrites MM/ML/MN in place. - No tag is dropped. Input chopper cannot handle correctly is a clear
error: aligned, secondary, supplementary, reverse-flagged or paired
records, and records without qualities. - See the "Unaligned BAM" section of the README for exactly what
happens to tags and headers in each direction.
Poly(A) tail trimming (#37, #86)
--trim-poly-tailsremoves a poly(T) head from the start and a
poly(A) tail from the end of each read. It is off by default. Tails
are found with cutadapt's scoring, allowing up to 20% other bases, so
sequencing errors inside a tail are tolerated. Runs shorter than 10
bases are left alone;--trim-poly-tails 15sets another minimum.- Tails must reach the end of the read, so remove adapters and primers
first. It combines with --trim-approach, --update-mods and BAM output.
Requested by @Potatoconomy in #37.
Leaner and stricter FASTQ parsing (#85)
- chopper now has its own small FASTQ reader in place of the
bio
crate. Runtime dependencies drop from 123 to 55 crates. - Malformed FASTQ is handled better. A sequence and quality string of
different lengths is an error naming the read and line; it used to
crash chopper during trimming. Blank lines and empty reads are
accepted. Parse errors exit with code 1 and a line number instead of
panicking.
Faster gzip decompression (#82)
- flate2 now uses the zlib-rs backend. This was 13-24% faster on ONT
and HiFi FASTQ with four threads. Contributed by @DylanCosto.
Other changes
- Gzipped FASTQ (and BAM) is now also detected on stdin.
- Dependency updates (#83).
Thanks to @DylanCosto for the gzip backend work.