You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: preserve missing signal when clustering heatmaps - #1505
Running plotHeatmap --hclust changes NaNs to zeros in the matrix written by --outFileNameMatrix.
Use a matrix with gaps in coverage and compare the values by region before and after clustering.
The patch substitutes zeros only in the arrays used to cluster rows and calculate distances.
The test matches rows by coordinates and name and compares every bin in the export with the input.
Does the PR contain new feature?
Does the PR contain bugfix?
Does the PR contain documentation changes?
Does the PR contain changes to the galaxy wrapper?
Heatmap clustering and silhouette calculations now replace NaNs with zeros for computation. A regression test checks that clustering preserves original region keys and values, including NaNs.
Changes: Heatmap clustering
Layer / File(s)
Summary
NaN handling and output preservation pydeeptools/deeptools/heatmapper.py, pydeeptools/deeptools/test/test_plotHeatmap.py
hmcluster and computeSilhouette replace NaNs with zeros for calculations. The regression test checks that clustered output retains original region keys and values, including NaNs.
Change: Bug fix
Merge Risk: Minimal · up to bd7ee
This fixes the case where missing values in the exported heatmap matrix became zeros during hierarchical clustering. The change is narrow and includes a regression test, so no actionable merge risk remains.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
Title follows Conventional Commits: type 'fix' is allowed, lowercase, colon present. It describes the main change: preserving missing (NaN) signal when clustering heatmaps.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
PR description is specific and relates to the changeset. It says plotHeatmap --hclust turns NaNs into zeros in the --outFileNameMatrix export. It says the patch replaces zeros only in clustering and d…
Full details: Description check
Explanation
PR description is specific and relates to the changeset. It says plotHeatmap --hclust turns NaNs into zeros in the --outFileNameMatrix export. It says the patch replaces zeros only in clustering and distance arrays. It also describes the new test, which compares exported bins by region with the input.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Running
plotHeatmap --hclustchanges NaNs to zeros in the matrix written by--outFileNameMatrix.Use a matrix with gaps in coverage and compare the values by region before and after clustering.
The patch substitutes zeros only in the arrays used to cluster rows and calculate distances.
The test matches rows by coordinates and name and compares every bin in the export with the input.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LKxc9GKLwnyeV2jaZBxH9N