Skip to content

fix: apply zero thresholds in computeMatrix - #1503

Open
rpinho wants to merge 1 commit into
deeptools:masterfrom
rpinho:fix-computematrix-zero-threshold
Open

rpinho wants to merge 1 commit into
deeptools:masterfrom
rpinho:fix-computematrix-zero-threshold

Conversation

@rpinho

@rpinho rpinho commented Nov 18, 2026 •

Copy link
Copy Markdown

computeMatrix ignores --minThreshold 0 and --maxThreshold 0.
Run it on three regions with negative, zero and positive signal and compare the rows with each flag.
The patch carries threshold presence and value through filtering and into the matrix header.
The test checks the rows and header with each flag and with both flags omitted.

  • 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?
  • Does the PR title follow Conventional Commits?

🤖 Generated with Claude Code

https://claude.ai/code/session_01LKxc9GKLwnyeV2jaZBxH9N

@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Explain Change →

Walkthrough

Thresholds now distinguish an unset value from an explicit zero. Configured thresholds filter rows, and the output header records the supplied values.

Changes: Matrix Threshold Handling

Layer / File(s) Summary
Parse, apply, and report optional thresholds
src/covcalc.rs, src/computematrix.rs, pydeeptools/deeptools/computeMatrix2.py, src/matrix/header.rs, pydeeptools/deeptools/test/test_computeMatrix_referencepoint.py
Thresholds are optional. A minimum skips rows with values at or below it; a maximum skips rows with values at or above it. Missing thresholds serialize as null, while explicit zero serializes as 0. Regression tests cover unset thresholds and zero minimum and maximum thresholds.

Change: Bug fix

Merge Risk: Minimal · up to 52baa

This change makes computeMatrix apply --minThreshold 0 and --maxThreshold 0 and record them in the output header. No concrete merge risk was found, though the tests were not run in this review.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed Title follows Conventional Commits: type 'fix' is allowed and lowercase, with a colon and description. It names the main change, zero thresholds applied in computeMatrix, which matches the summary and…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed Me caveman. PR description talk about computeMatrix threshold bug, zero flags, three test regions, matrix header. Match changeset: threshold Option change, header serialization, regression test. Relat…
Full details: Title check

Explanation

Title follows Conventional Commits: type 'fix' is allowed and lowercase, with a colon and description. It names the main change, zero thresholds applied in computeMatrix, which matches the summary and objectives.

Full details: Description check

Explanation

Me caveman. PR description talk about computeMatrix threshold bug, zero flags, three test regions, matrix header. Match changeset: threshold Option change, header serialization, regression test. Related. Pass.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

Clippy (1.99.1)

Clippy execution failed

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.

Share

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