Skip to content

Releases

lrsqueeze 0.9.0

Choose a tag to compare

@github-actions github-actions released this 11 Nov 16:39
  • verify decodes CRAM on -@ threads (pasta's multithreaded CRAM reader, after 0.9.1): on
    HG003, 8 minutes instead of 16, with peak memory 6.6 GB instead of 4 GB. When the original
    is CRAM too, the two files share those threads.
  • PacBio --max: each read gets the mean of its Phred scores, instead of a quality from rq (or
    from its mean error probability where there is no rq, as in FASTQ and older HiFi BAMs). Its
    calls now match the original's: indel F1 −0.005 pp on Revio HG002 and −0.003 pp on HiFi HG002,
    within noise, where rq cost 0.17 pp and the mean error 0.82 pp. Archives are slightly
    smaller. Policy files can name source = "mean-phred"; archives from earlier versions record
    "rq" and still verify.
  • ONT: unmapped reads, such as those of Dorado's unaligned BAM, keep native qualities in
    homopolymers of 5 bp or more found in their own bases, as FASTQ does, instead of being binned
    throughout. The built-in policies record homopolymers_in = "reference-or-read"; archives
    made by 0.2.1 and earlier record no source, mean "reference", and still verify.

Added

  • CRAM input: pack and verify read an aligned CRAM (3.0 or 3.1, such as one written by
    samtools) wherever they read a BAM, decoded against -T. MD and NM are kept as the CRAM
    stored them. Both warn when a CRAM lacks its end-of-file container, as they do for BGZF. CRAM
    is decoded on half the -@ threads, alongside the other pools. On HG003 at -@ 16, packing a
    CRAM took 7 minutes, against 5.5 from the BAM.
  • --keep-ml: keep base-modification probabilities (ML) exactly instead of in 16 levels, for
    methylation called at a fixed threshold that is not a multiple of 1/16. On eight PacBio Revio
    genomes, 16 levels moved 716–18,676 CpG sites by more than 10 pp at such a threshold;
    --keep-ml moved none, for an archive about 7% larger. It applies to FASTQ too, and
    verify --platform takes it for archives that do not record their policy.

Fixed

  • pack refuses an output that is its input (under any name, links included), which it would
    have overwritten while reading it. With CRAM input, -o sample.cram sample.cram is an easy
    slip.
  • pack removes an index of an earlier file at the output's name (.crai, .bai, .csi) when
    it writes none, so region queries never read a stale index.
  • --methylation cpg and cpg-only leave MM/ML as they are on records whose MN is not
    their read length, such as hard-clipped supplementary alignments that kept the primary's
    tags. Their calls were matched to the wrong bases, or stopped the run.
  • Malformed records (shorter than BAM's fixed fields, or with a CIGAR that does not cover the
    read's bases where homopolymers are projected) are reported as errors instead of stopping a
    thread.
  • CRAM and gzip are recognized on standard input even when the pipe delivers the first bytes in
    pieces.

Install

Download the archive for your platform below (Linux x86-64 with glibc 2.28 or newer, or macOS on
Apple silicon), check it against its .sha256, and put lrsqueeze on your PATH. Or build it
with Rust 1.91 or newer:

cargo install --locked --git https://github.com/DylanCosto/lrsqueeze --tag v0.9.0