Skip to content

Plot fixes, filename centralization, and pre-release option lockout - #246

Merged
RunpengLuo merged 4 commits into
raphael-group:hatchet3-devfrom
RunpengLuo:feat/plot-fixes
Jul 31, 2026
Merged

Plot fixes, filename centralization, and pre-release option lockout#246
RunpengLuo merged 4 commits into
raphael-group:hatchet3-devfrom
RunpengLuo:feat/plot-fixes

Conversation

@RunpengLuo

Copy link
Copy Markdown
Collaborator

Groups four related changes on feat/plot-fixes (squash-merges to one commit). Full test suite (63) passes; ruff check + format clean.

Plot fixes

  • Centralize all plot styling in hatchet.yaml (plot_* keys, shared get_plot_style); registered as hidden CLI flags.
  • cluster-bins K plots split into K{k}.pdf (1D/2D) + K{k}.diagnostic.pdf; 1D unified onto plot-cn's multi-sample layout; fix axes box, titles, legend, value ranges.
  • plot-panel: always show all clones (drop the multi-sample-incorrect show_prop/min_prop); forward resolved style to plot_1d2d sub-runs.
  • Simplify pool-panel clone labels.

Filename centralization

  • New src/hatchet/filenames.py: single source of truth for all input/output/subdirectory names (constants + templated helpers). cluster-bins, compute-cn, evaluate, plot, and utils import from it so producer/consumer filename contracts cannot silently drift.

Restrict pre-release solver options

  • Drop the bin_dir U-initialization entirely (parameter + code path).
  • Hide cnt_cd from --mode and its companion args (--tree_file, --eps_fit) from --help; still reachable internally and in tests, just not user-selectable pre-release.
  • Docs synced (reference.md, compute-cn.md).

Cleanup

  • compute-cn: move run_plot_cn/plot_pareto_curve into plot_compute_cn.py; remove dead filtering(); reorder compute_cn_utils.py into sections.
  • Remove dead show_prop config; fix snakemake test config section names (underscore -> hyphen); ignore .vscode/.
  • Rename brand HATCHet3 -> HATCHet (docs, metadata, test strings); the lowercase hatchet3 env/bioconda identifier is intentionally unchanged.

…layout; prune dead config

Styling:
- Move all plot hyper-parameters into hatchet.yaml under plot_* keys, shared
  across cluster-bins (plot-rdr-baf), plot-cn, and plot-panel via a single
  get_plot_style(args); register them as hidden CLI flags
  (add_arguments_plot_style).

cluster-bins plots:
- Split K plots into K{k}.pdf (1D/2D) + K{k}.diagnostic.pdf; only bulk.K{k}.pdf
  copied to bbc/.
- Unify 1D onto the multi-sample layout matching plot-cn (all samples one page,
  2 rows/sample); fix gray-axes box, drop "sample=" titles, snug legend, pad
  mhBAF/RDR ranges.

plot-panel:
- Always show all clones; drop show_prop inlining and min_prop filtering, which
  mishandled the multi-sample case (iloc[0]).
- Forward the resolved plot_* style to plot_1d2d sub-runs instead of dead
  hardcoded constants.

compute-cn:
- Move run_plot_cn and plot_pareto_curve (was plot_pareto_pdf) into
  plot_compute_cn.py; config-driven.
- Remove dead filtering() (superseded by cluster-bins filter_clusters);
  reorder compute_cn_utils.py into labeled sections.

Cleanup:
- Remove dead show_prop config (hatchet.yaml + --show_prop flag).
- tests: fix snakemake config section names (underscore -> hyphen).
- gitignore: ignore .vscode/.
…labels

- Add src/hatchet/filenames.py as the single source of truth for pipeline
  input/output/subdirectory names (constants + templated helpers). Wire
  cluster-bins, compute-cn, evaluate, plot, and utils through it so
  producer/consumer filename contracts (gammas, best.*.ucn, summary,
  results.*, objectives, sols/) cannot silently drift. Legacy
  evaluate_pool_solutions names (no current producer) are flagged, not faked.
- plot_compute_cn: rename _format_pool_label -> _fmt_pool_label, add _fmt_prop,
  inline per-sample clone proportions in pool-panel y-labels.
- Drop the bin_dir U-initialization entirely: remove _random_tumor_matrix_bin_dir,
  its build_random_u branch, and the u_bin_p parameter from parser, yaml,
  compute_cn, and inference.
- Hide cnt_cd from --mode choices and hide its companion args (--tree_file,
  --eps_fit) from --help. Both remain reachable internally and in tests; they
  are simply not user-selectable pre-release.
- Sync docs (reference.md table, compute-cn.md --help usage).
Brand text only (package description, CI step name, docstrings, comments).
Does not touch the lowercase env/bioconda identifier `hatchet3`.
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 80.30769% with 64 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (hatchet3-dev@13a087b). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/hatchet/compute_cn/compute_cn_utils.py 42.10% 33 Missing ⚠️
src/hatchet/plot/plot_cnp_panel.py 0.00% 8 Missing ⚠️
src/hatchet/evaluate/evaluate.py 0.00% 6 Missing ⚠️
src/hatchet/evaluate/evaluate_utils.py 0.00% 6 Missing ⚠️
src/hatchet/cluster_bins/cluster_bins.py 90.90% 2 Missing ⚠️
src/hatchet/filenames.py 97.05% 2 Missing ⚠️
src/hatchet/hatchet_parser.py 86.66% 2 Missing ⚠️
src/hatchet/plot/plot_cluster_bins.py 96.61% 2 Missing ⚠️
src/hatchet/plot/plot_compute_cn.py 95.55% 2 Missing ⚠️
src/hatchet/cluster_bins/hmm/hmm_init_utils.py 50.00% 1 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@               Coverage Diff               @@
##             hatchet3-dev     #246   +/-   ##
===============================================
  Coverage                ?   60.58%           
===============================================
  Files                   ?       39           
  Lines                   ?     5074           
  Branches                ?        0           
===============================================
  Hits                    ?     3074           
  Misses                  ?     2000           
  Partials                ?        0           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@RunpengLuo
RunpengLuo merged commit a0af91b into raphael-group:hatchet3-dev Jul 31, 2026
3 checks passed
@RunpengLuo
RunpengLuo deleted the feat/plot-fixes branch July 31, 2026 19:14
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