Skip to content

Align Notation#3

Merged
fra-pcmgf merged 7 commits intoKlugerLab:mainfrom
wes-lewis:clean-notebook-pfinal
Mar 3, 2026
Merged

Align Notation#3
fra-pcmgf merged 7 commits intoKlugerLab:mainfrom
wes-lewis:clean-notebook-pfinal

Conversation

@wes-lewis
Copy link
Collaborator

This PR aligns LOCAT code naming with manuscript notation and clarifies depletion vs concentration semantics across the codebase.

Summary
Renamed depletion-scan API and variables to manuscript-style terms.
Renamed key output fields for clarity and consistency.
Updated downstream plotting code to consume new field names.
Standardized expression matrix access naming (W) in LOCAT classes.
Kept behavior unchanged; this is primarily a naming/consistency refactor.
Key changes

  1. Depletion scan naming aligned to manuscript
    In both locat/locat_condensed.py and locat/locat_condensed_git.py:

localization_pval_dep_scan -> depletion_pval_scan
c_values -> lambda_values
loop variable c -> lambda_
rc_c_values -> rc_lambda_values
best_c -> best_lambda
per_c -> per_lambda
n_eff -> n_eff_g
n_trials -> n_trials_eff
This makes depletion threshold notation match manuscript
λ
λ-based notation and distinguishes gene-specific effective sample size.

  1. Output key updates
    n_components -> K_components (matches manuscript
    K
    g
    K
    g

    )
    added/used depletion_pval for depletion score output
    added/used h_size and h_sens for final-score penalty terms
    diagnostics key uses depletion_scan
  2. LOCAT data matrix naming
    Introduced/used W property in LOCAT classes for expression matrix access (matching manuscript
    W
    W).
  3. Downstream caller updates
    In locat/plotting_and_other_methods.py:

switched plot annotations from localization_pval to depletion_pval
updated labels accordingly (DepPval, dep_pval)
Validation
python -m py_compile passes for:
locat/locat_condensed.py
locat/locat_condensed_git.py
locat/plotting_and_other_methods.py
Notes
Refactor is intended to improve naming consistency and interpretability.
Functional/statistical behavior is unchanged; only identifiers/field names were aligned.

Copy link
Collaborator

@fra-pcmgf fra-pcmgf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@fra-pcmgf fra-pcmgf merged commit 9043d85 into KlugerLab:main Mar 3, 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