Skip to content

Preserve depletion Sidak correction behavior#7

Merged
fra-pcmgf merged 2 commits intoKlugerLab:mainfrom
wes-lewis:fix-depletion-sidak-behavior
Mar 26, 2026
Merged

Preserve depletion Sidak correction behavior#7
fra-pcmgf merged 2 commits intoKlugerLab:mainfrom
wes-lewis:fix-depletion-sidak-behavior

Conversation

@wes-lewis
Copy link
Copy Markdown
Collaborator

Summary

This preserves edge-case Sidak correction behavior in the depletion test with the behavior in the original locat_condensed.py.

In locat-0.1, logsidak_from_logp() returned the unadjusted logp_min whenever logp_min <= 0, which is the ordinary case for log-p values. That effectively skipped the Sidak correction in the depletion scan.

This change restores the original behavior from locat_condensed.py:

  • only skip the correction when there is effectively a single test (m_eff <= 1)
  • otherwise apply the Sidak correction in log-space

Why

On local comparison runs, this minimal helper fix was sufficient to bring the locat-0.1 depletion behavior much closer to the original locat_condensed results in the null-calibration simulation, without changing the rest of the locat-0.1 scan path.

Scope

This PR only changes logsidak_from_logp() in locat/locat.py.

@fra-pcmgf
Copy link
Copy Markdown
Collaborator

I updated the test result. I'm merging the code to main and release a new version

@fra-pcmgf fra-pcmgf merged commit b43166e into KlugerLab:main Mar 26, 2026
1 check 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