Repository navigation
v0.12.0
This release fixes a large backlog of bugs found in a review of the whole codebase. It also makes balancing faster, and more correct in the trans-only case. It also removes features that didn't work well, and drops several dependencies.
Fixes
cooler cloadassigned a position at the end of a chromosome to the next chromosome's first bin, turning a cis contact into a trans one. Such positions are now rejected.- cooler cp
/mv/ln -w` could empty the destination file when the operation failed. cooler zoomifydestroyed its input when the default output name was the input file, and--base-urikept only one base cooler.- Custom field aggregators:
cload pairs --field ...:agg=max(ormin) combined chunks by summing them, and fields given out of column order swapped their values. - Aggregating multiple value columns:
coarsenandzoomifydropped every value column exceptcount. - Extra long chromosomes: chromosomes longer than 2^31 bp overflowed, and pixel values too large for their column were clipped. Long chromosomes are now stored correctly, and values that don't fit raise an error.
- Guarding against unsorted input: Unsorted input could produce coolers with a corrupt index or duplicate pixels.
- A failed write no longer leaves a partial cooler behind or destroys an existing one.
Balancing
- Trans-only balancing balances to exact targets and filters bins based on trans data only. Trans-only weights change, mostly by a few percent.
- Cis-only balancing is now as fast as genome-wide balancing on assemblies with many contigs: 4.6 s instead of 316 s on 2,010 contigs.
--forcekeeps the existing weights until new ones are stored, and storing weights works on assemblies with many thousands of contigs (#226).- New options:
cooler balance --rescale-marginals/--no-rescale-marginals(#448) andbalance_cooler(..., ignore_dist=...).--ignore-distworks with variable-size bins (#464).
New features
cload pairs --field ...:agg=sum_squares. With a sum and a count, it can be used to give a column's mean and variance, and all three stay exact when coarsening and merging.- Range queries are faster: matrix queries on HDF5 files take about two thirds of the time.
- 2D range queries can return several value columns at once.
cooler.log_to_stderr()shows cooler's log messages in scripts and notebooks. Importing cooler no longer configures logging.
Removed
cooler csortis gone.cooler cload pairscan ingest unsorted pairs directly. To sort and index pairs files, usepairtools sortinstead.meanand other field aggregations that depend on how pixels are grouped. To get a mean, store a sum and a count, which combine exactly.cooler.sandbox,cooler zoomify --legacy, and the deprecatedappendargument ofcooler.create.create.
Dependencies
- cooler no longer depends on
cytoolz,multiprocessordill. Parallel commands use Python'smultiprocessing, which made parallel balancing about 2.2x faster. Functions passed to a process pool must now be picklable, so lambdas no longer work. pyfaidxis optional and included incooler[all].- Tested on Python 3.9 to 3.14, NumPy 1.26 and 2.x, and pandas 1.5 to 3.x.
Full Changelog: v0.11.0...v0.12.0