Skip to content

Fix enrichment in compare plots and compare plot diffs#626

Merged
kclem merged 1 commit intopinellolab:masterfrom
edilytics:master
Mar 13, 2026
Merged

Fix enrichment in compare plots and compare plot diffs#626
kclem merged 1 commit intopinellolab:masterfrom
edilytics:master

Conversation

@Colelyman
Copy link
Copy Markdown
Contributor

@Colelyman Colelyman commented Mar 12, 2026

This PR introduces the comparison of plots and fixes the ordering of the enrichment of the allele quilts in CRISPRessoCompare.

* Run diffs on the plots in integration tests

* Correct diff-plots now

* Pin matplotlib in test dependencies and update running integration tests

* Fix cross-pollution of integration tests

* Install MS core fonts in CI for consistent plot rendering

CRISPResso2 requests Arial as the primary font via matplotlib's
font.sans-serif setting. Without MS core fonts installed, the CI
runner falls back to a different font, causing upset plots (and
potentially others) to exceed the RMSE image comparison threshold.

This matches the Dockerfile which already installs
ttf-mscorefonts-installer. Also clears matplotlib's font cache
so it discovers the newly installed fonts.

* Remove matplotlib pin in tests and don't run diff-plots with Pro

* Reorder base edit plots and update caption in Compare

* Rebuild pixi fontconfig cache after MS font installation in CI

The pixi/conda environment has its own fontconfig with a separate
font cache (.pixi/envs/test/var/cache/fontconfig/). When the pixi
environment is restored from actions/cache, this fontconfig cache
is stale and doesn't know about the MS core fonts installed via
apt-get. Running the system fc-cache only updates the system
fontconfig, not the pixi one.

Fix: run 'pixi run -e test -- fc-cache -f' to rebuild the pixi
fontconfig cache so that matplotlib's findSystemFonts() discovers
Arial via the pixi fc-list.

* Update base editing caption in compare

* Sort Compare allele plots by aligned sequence as well

* Attempt to fix sorting of compare allele plots

* Sort the df being passed into the plot in compare!

* Sort the bottom compare plots too!

* Make the tiebreaking logic in compare enrichment consistent

* Cache MS fonts in pixi

* Point integration tests back to master and revert pixi.toml

* Fix mutating args directly in compare
@kclem kclem merged commit 6eacce4 into pinellolab:master Mar 13, 2026
9 of 16 checks passed
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.

2 participants