Skip to content

pycoqc-ng 3.0.0

Choose a tag to compare

@duceppemo duceppemo released this 19 Oct 20:59
· 99 commits to main since this release

First release of pycoqc-ng, a maintained continuation of pycoQC by Adrien Leger and Tommaso Leonardi, which is no longer developed.

pip install pycoqc-ng

What this adds over pycoQC 2.5.2

  • Dorado / unaligned BAM input via Bam_to_seq_summary
  • POD5 input via Pod5_to_seq_summary
  • FASTQ input via Fastq_to_seq_summary, including %GC metrics and plots
  • Per-barcode length and %GC boxplots, and a basecall summary by barcode
  • Runs on current dependencies: numpy 2.x, pandas 2.x and 3.x, plotly 5-7, pysam 0.22+, Python 3.9-3.13
  • No compiled extension — installs as a pure Python package

Notable fixes

The package could not previously be installed and used: two modules imported a Cython extension built at the repository root, which only worked when the current directory happened to be the repo.

  • Fastq_to_seq_summary reused one dict for every read in a file and queued that same object repeatedly. Because mp.Queue pickles in a background thread, entries were overwritten before serialisation: a 200-read file produced 200 rows holding only 2 distinct reads.
  • The time-binned plots dropped missing values from one column while reading times from another, pairing values with the wrong time bins.
  • FASTQ chunk sizes were counted in lines rather than reads, so a size not divisible by four silently discarded records.
  • max_fastq processed one file fewer than requested; N50 failed on read-only arrays; elapsed times broke on pandas 3; plotly 7 compatibility; python -m pycoQC did nothing.

Performance

  • FASTQ parsing is 3.3x faster, with byte-identical output. Timestamps now use datetime.fromisoformat rather than dateutil (160-220x faster per read), and mean q-scores use a 256-bin count and one dot product.
  • Removing Cython made quality scoring 1.4-14x faster and exact; the old approximate pow drifted up to 0.05 Phred.
  • The FASTQ converter no longer nests process pools. The process count was roughly the square of the thread count — 202 processes at -t 16, now 17.

Project

73 tests and GitHub Actions CI across Python 3.9-3.13 and macOS, plus a pyflakes lint gate. See CHANGELOG.md for the full list.

Citing

Please cite the original authors:

Leger A. and Leonardi T. (2019). pycoQC, interactive quality control for Oxford Nanopore Sequencing. Journal of Open Source Software, 4(34), 1236. https://doi.org/10.21105/joss.01236