Skip to content

fix(preseq): record status for unestimable libraries - #183

Draft
NicoDeVeaux wants to merge 3 commits into
mainfrom
codex/fix-preseq-unestimable-output
Draft

NicoDeVeaux wants to merge 3 commits into
mainfrom
codex/fix-preseq-unestimable-output

Conversation

@NicoDeVeaux

@NicoDeVeaux NicoDeVeaux commented Nov 1, 2026 •

Copy link
Copy Markdown

An enabled preseq analysis can exit successfully after an estimation warning while leaving no preseq/* artifact. This breaks the nf-core RustQC module's required output: Nextflow fails even though RustQC returned zero. Both a two-molecule library and a 30-molecule histogram rejected by the Good-Toulmin 2x check reproduce it.

The history keeps the reproducer, behavioral fix and follow-ups independently reviewable:

  1. fe8b8a: CLI tests generate indexed BAM/GTF inputs and assert the missing status/error behavior. Production code unchanged; four assertions fail and two controls pass.
  2. 3e3e8e: keep the warning and successful estimation-skip policy, but emit <sample>.preseq_skipped.txt with STATUS and REASON columns. Emit no numeric curve for a rejected estimate. Successful reruns in the same output layout remove the stale opposite artifact for that sample; write/removal failures propagate.
  3. fa9d92: update only crossbeam-epoch to 0.9.20 and libz-sys to 1.1.31 in Cargo.lock, fixing the two audit failures without new ignore rules.

Run at the reproducer and behavioral-fix commits:

cargo test --release --test preseq_output

The new controls cover both output layouts, disabled analysis, finite numeric output for a healthy sample, same-layout success↔skip transitions, neighboring-file preservation and write/removal failures. Estimator math, thresholds and randomness are unchanged. Cleanup is limited to the current output layout; files in another historical layout are retained.

Local release validation after the dependency updates passes all 245 tests, and formatting passes. cargo audit now exits zero with zero vulnerabilities using the same advisory database and policy; informational warnings remain. The 13 preseq regressions pass. The actual nf-core module was checked with both original failing paired-end inputs at threads 1/4. This is a local native module check; full rnaseq/Wave qualification remains separate.

Hosted CI passes all seven checks on the final head: Linux baseline, Linux x86-64-v3 and macOS ARM tests, formatting, Clippy, MSRV and security audit.

The local toolchain still reports three inherited needless_range_loop diagnostics in strict Clippy. Unchanged-main control code reproduces them; no lint suppression is included. Hosted Clippy is checked separately. The PR remains draft for maintainer review.

A header-only .lc_extrap.txt is unsafe: the actual MultiQC 1.35 CLI crashes on it, including beside a healthy curve. A distinct STATUS\tREASON file is safely ignored; a healthy curve alongside it remains the only parsed preseq sample. This represents missing scientific estimates explicitly instead of substituting zeros or predictions.

This is written by an AI agent (model name unavailable) on Nico DeVeaux’s behalf.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant