Skip to content

Rescale and LOT correction - #424

Open
Soorya19Pradeep wants to merge 100 commits into
mainfrom
rescale-lot-correction
Open

Soorya19Pradeep wants to merge 100 commits into
mainfrom
rescale-lot-correction

Conversation

@Soorya19Pradeep

@Soorya19Pradeep Soorya19Pradeep commented May 19, 2026 •

Copy link
Copy Markdown
Contributor

The following have been implemented in this branch:

  • TripletDataModule that rescales the patches to a reference pixel and a uses the Z-MIP projection transform
  • computation and use of the computed linear optical transfer function for batch correction between datasets.
  • a simple case of computation of Maximum Mean Discrepancy (MMD) with sample config.

@edyoshikun
edyoshikun force-pushed the rescale-lot-correction branch from a93d071 to 37b81ff Compare June 29, 2026 17:59
@edyoshikun
edyoshikun changed the base branch from modular-viscy-staging to main June 29, 2026 20:22
Soorya19Pradeep and others added 6 commits June 29, 2026 13:28
…staging

Scale-aware patch extraction (packages/viscy-data):
- Add _read_pixel_size() helper to read X pixel size from OME-Zarr metadata
- Add reference_pixel_size parameter to TripletDataModule: when set, computes
  initial_yx_patch_size from the pixel-size ratio so the same physical area is
  covered at inference time
- Replace BatchedRescaleYXd (removed per review) with existing BatchedZoomd
  using scale_factor=(1.0, final_y/initial_y, final_x/initial_x) and
  mode="bilinear" with antialias; import is lazy to avoid a hard dep

LOT batch correction (applications/dynaclr):
- Add dynaclr.evaluation.lot_correction submodule with core logic (fit, apply,
  save, load), Pydantic configs, and Click CLI entry points
- Register fit-lot-correction and apply-lot-correction in cli.py via LazyCommand
- Add pot and joblib to optional-dependencies.eval in pyproject.toml

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Plots n cell patches side-by-side:
- Left: raw patch at initial_yx_patch_size (larger physical area)
- Right: same patch bilinearly downscaled to final_yx_patch_size (model input)

Both columns share the same percentile contrast window so differences are
spatial. Physical scale (µm × µm) is shown in each panel title.

Usage:
  python visualize_triplet_rescaling.py       --data-path /path/to/data.zarr       --tracks-path /path/to/tracks       --source-channel Phase3D       --z-range 0 5       --final-yx-patch-size 224 224       --reference-pixel-size 0.325       --output rescaling_comparison.png

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…meta

_collate_norm_meta iterated every normalization level and called
torch.stack on each stat, but timepoint_statistics is nested
{timepoint: {stat: tensor}} rather than flat {stat: tensor}. Any zarr
carrying timepoint_statistics (alongside fov/dataset stats) crashed
batch collation in TripletDataModule with "expected Tensor as element 0
... but got dict". Stack within each timepoint sub-dict instead.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…etDataModule

Lets a 3D OME-Zarr feed a 2D model without materializing a separate MIP
dataset, and centers the extracted Z window on each FOV's focus plane.

- z_reduction ("mip"/"center"): collapse the extracted z_range to one
  slice via BatchedChannelWiseZReductiond. Label-free channels (resolved
  by parse_channel_name) take the center slice; others are max-projected.
  on_after_batch_transfer expects Z=1 when reduction is on.
- z_extraction_window/z_focus_offset/focus_channel: resolve a per-FOV
  focus-centered window from each position's
  focus_slice[ch].fov_statistics.z_focus_mean (fallback z_total//2), all
  windows the same width. z_range stays as an explicit override; exactly
  one of z_range / z_extraction_window must be given. Per-FOV windows are
  resolved at setup() and looked up per patch in the dataset.

Tests cover both reduction strategies (discriminating center vs MIP),
the normalize-then-reduce order, per-FOV focus resolution, and the
z_range/z_extraction_window XOR guard.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Documents the TripletDataModule predict path (zarr + tracking, not
parquet) and adds a runnable sample config demonstrating z_reduction +
reference_pixel_size to feed a 3D dataset to a 2D model.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Notebook-style script (no CLI) that loads a 3D OME-Zarr + tracking,
extracts a per-FOV focus-centered Z window, collapses it via z_reduction,
applies a random affine so anchor/positive diverge, and visualizes a
couple of batches to a PNG.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR expands the Triplet-based data loading path to better support cross-dataset inference (pixel-size aware patch extraction + on-the-fly Z reduction + focus-centered per-FOV Z windows), and adds a LOT (Linear Optimal Transport) batch-correction pipeline with CLI entrypoints for embedding-space correction.

Changes:

  • Extend TripletDataModule/TripletDataset to support per-FOV z_range resolution via z_extraction_window + focus_slice metadata, plus optional z_reduction and pixel-size aware rescaling.
  • Add LOT correction core functions + Pydantic config models + dynaclr CLI commands for fitting/applying correction pipelines.
  • Add tests for the new Triplet Z-window/Z-reduction behavior and update docs/config examples for inference.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
packages/viscy-data/src/viscy_data/triplet.py Adds pixel-size rescaling, per-FOV focus-centered Z windows, and optional Z-reduction in the Triplet datamodule/dataset.
packages/viscy-data/tests/test_triplet.py Adds tests for z_extraction_window XOR validation, per-FOV focus-centered windows, and Z-reduction behavior/order.
packages/viscy-data/src/viscy_data/_utils.py Extends norm-meta collation to correctly stack nested timepoint_statistics.
applications/dynaclr/src/dynaclr/evaluation/lot_correction/lot_correction.py Implements LOT correction fit/apply + pipeline save/load helpers.
applications/dynaclr/src/dynaclr/evaluation/lot_correction/config.py Adds Pydantic models for fit/apply configs and filter specs.
applications/dynaclr/src/dynaclr/evaluation/lot_correction/fit_lot_correction.py CLI wrapper for fitting and saving a LOT pipeline from YAML config.
applications/dynaclr/src/dynaclr/evaluation/lot_correction/apply_lot_correction.py CLI wrapper for applying a saved LOT pipeline to an embedding zarr.
applications/dynaclr/src/dynaclr/evaluation/lot_correction/init.py Exposes LOT correction functions at the package level.
applications/dynaclr/src/dynaclr/cli.py Registers new fit-lot-correction and apply-lot-correction CLI subcommands.
applications/dynaclr/pyproject.toml Adds joblib + pot to eval extras for LOT correction dependencies.
applications/dynaclr/scripts/dataloader_inspection/visualize_triplet_rescaling.py Adds a visualization utility for the new pixel-size rescaling behavior.
applications/dynaclr/scripts/dataloader_inspection/triplet_dataloader_zprojection.py Adds an inspection notebook/script for focus-centered Z windows + Z-reduction.
applications/dynaclr/docs/DAGs/inference_triplet.md Documents Triplet inference path and new options (needs a small wording update for z-window semantics).
applications/dynaclr/configs/prediction/predict_triplet_2d_from_3d.yml Provides a sample prediction config demonstrating reference_pixel_size + z_reduction.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/viscy-data/tests/test_triplet.py
Comment thread packages/viscy-data/src/viscy_data/triplet.py Outdated
Comment thread packages/viscy-data/src/viscy_data/triplet.py
Comment thread packages/viscy-data/src/viscy_data/triplet.py
Comment thread packages/viscy-data/src/viscy_data/triplet.py
Comment thread applications/dynaclr/docs/DAGs/inference_triplet.md Outdated
edyoshikun and others added 17 commits June 29, 2026 14:07
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
- Declare viscy-transforms in viscy-data's triplet extra and hoist the
  BatchedZoomd/BatchedChannelWiseZReductiond imports to module top; the
  inline imports were masking a missing runtime dependency that would
  ImportError for anyone using z_reduction or reference_pixel_size.
- Raise in _resolve_per_fov_z_ranges when a FOV's Z is smaller than
  z_extraction_window, instead of silently emitting a narrower window
  that breaks cross-FOV batch stacking.
- Remove a dead duplicate break in test_focus_centered_z_range.
- Correct the inference DAG doc: embeddings live in .X (the embedding_key
  array), mirrored to obsm["X_backbone"]/["X_projections"].

uv.lock intentionally omitted: the workspace glob currently entangles the
untracked applications/eet package, so a clean regen of the single
viscy-transforms edge is not possible until eet is committed or removed.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Replace the NumPy/scipy.cdist backend with PyTorch so the pooled RBF
kernel matrix is built once on the available device (CUDA if usable,
else CPU) and reused across all permutations. Device selection probes a
trivial kernel launch and falls back to CPU, so a present-but-unusable
GPU (e.g. compute capability older than the torch build) does not crash.

Public API is unchanged: median_heuristic/compute_mmd_unbiased return the
same bandwidth-convention values, and mmd_permutation_test still returns
(mmd2, p_value, null_distribution) so dynaclr's effect-size and activity
z-score computations keep working.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Add witness_function to the MMD module: the per-point empirical witness
w(z) = mean_i k(z, x_i) - mean_j k(z, y_j), the RKHS direction along
which distributions P (X) and Q (Y) differ. Positive scores lean toward
X, negative toward Y. Reuses the GPU RBF-kernel helpers and bandwidth
(median-heuristic) convention already in the module, and chunks over
query points to bound the intermediate kernel matrices.

Tests cover distribution separation, X<->Y antisymmetry, and chunk-size
invariance.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Adds `label_source: witness` to the linear-classifier eval as a second
option to annotation-CSV labels. Per marker, cells are pooled across
experiments, control/perturbed references are built from per-experiment
wells, the MMD witness is fit and scored per cell, and scores are gated
(sign + dead-zone) into control/perturbed pseudo-labels. Everything
downstream (train_linear_classifier, publish, append-predictions, plots)
is unchanged — only the label source differs.

- evaluate_config.py: WitnessLabelSource, WitnessSettings, label_source
  switch on LinearClassifiersStepConfig (annotations stays the default).
- witness_labels.py: well->reference mask (path-component match so C/1
  != C/10), witness fit/score, dead-zone gating.
- orchestrated.py: branch label assembly into _annotation_run_specs /
  _witness_run_specs / _build_labeled_adata; training loop unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Five integration tests exercising the real code path:
- well-prefix match rejects C/1 vs C/10 confusion
- witness scores separate control/perturbed clusters
- dead-zone drops ambiguous near-origin cells
- empty AnnData when a reference group has no cells
- end-to-end run_linear_classifiers witness mode → metrics + summary PDF

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Mirrors linear_classifiers_infectomics.yml but with label_source: witness.
Per-experiment control/perturbed wells replace annotation CSVs; wells are
templates to edit per plate layout. One classifier per marker (G3BP1,
SEC61B, Phase3D, viral_sensor), dead_zone 0.1, track-level split.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- witness_score_classifiers.md: full DAG (why, step-by-step, gating rule,
  config, notes) plus embedded visuals.
- visuals/: three Graphviz flow diagrams (data flow, gating, pipeline) as
  .dot + png + pdf, and four mock example-output plots (witness-score
  histogram, per-marker metrics bar, ROC, F1-over-time) with a reproducible
  generator (mock_witness_plots.py). Mock plots are watermarked synthetic.
- Cross-links from evaluation.md and linear_classifiers/README.md so the
  new DAG is discoverable from the annotation path.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The witness label is a deterministic function of the embedding, so
evaluating a witness-trained classifier against that same label is
circular — it reports a trivial ~1.0 (verified on real infectomics
embeddings: 1.000 vs witness label, 0.712 vs true infection_state).

WitnessSettings gains eval_against (default "infection_state") and
eval_class_map ({control: uninfected, perturbed: infected}). In witness
mode, val metrics are recomputed on the val split against the ground-truth
obs column via the class map; the summary records eval_source. When the
column is absent, metrics fall back to the witness label flagged as
eval_source="witness_label". Adds two tests (annotation eval + fallback).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Score the witness-trained classifier against infection_state (not the
self-referential witness label) with the control→uninfected /
perturbed→infected class map, matching the leakage fix.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- witness_score_classifiers.md: add "Evaluation: avoid the circularity
  trap" section with the real per-marker metrics table (scored vs
  infection_state), eval_against/eval_class_map in the config block, and
  step 7 in the flow; refresh the Notes caveat (metrics are honest now,
  check eval_source; note class imbalance).
- witness_dataflow.dot/png/pdf: add the EVALUATE-vs-annotations node.
- mock_witness_plots.py + bar/ROC png/pdf: use real run values (viral_sensor
  0.87, SEC61B 0.76, Phase3D 0.58, G3BP1 0.49) instead of invented all-high
  numbers; watermark clarifies bar/ROC are real, hist/F1 synthetic.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
edyoshikun and others added 14 commits July 28, 2026 11:13
…bs enrichment

Expand the per-reporter triplet predict path (dynaclr predict-triplet):

- foundation model_type: instantiate the model: block of a LightningCLI
  training_config (frozen encoder loads its own weights) instead of loading a
  ContrastiveModule checkpoint; --checkpoint / --training-config gate by type.
- focus-centered Z: --z-window WIDTH centered per-FOV on the focus plane
  (--focus-channel / --z-focus-offset), mutually exclusive with fixed --z-range;
  --reference-pixel-size-z-um converts the reference-grid slice count to the
  native count covering the same physical depth.
- obs enrichment: append collection metadata (experiment/marker/perturbation/
  organelle/microscope/hours_post_perturbation/interval_minutes) to each
  embedding's obs so triplet and parquet embeddings are consumed identically;
  --no-enrich-obs opts out. New enrich-obs-from-collection subcommand backfills
  obs onto already-written embeddings.
- exclude_fovs from the collection experiment is forwarded to predict.

Update the {ckpt}/embeddings/{marker}.zarr path expectation in
test_output_path_is_dataset_centric (embeddings/ nesting from d89f9ed).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
…lections

run-matrix / predict-batch gain:

- foundation rows (model_type: foundation): resolve from explicit identity +
  training_config (no train_sbatch parsing), never emit a train stage, and
  forward --model-type/--training-config through predict-batch and predict.sbatch
  instead of a checkpoint.
- focus-centered Z + physical Z reference (z_window/focus_channel/z_focus_offset/
  reference_pixel_size_z_um) forwarded as the trailing predict positionals;
  z_range and z_window validated mutually exclusive.
- skip-existing (default) via resolve_datasets_to_run: prune datasets whose
  per-marker embeddings already exist for a row's (family, run, ckpt_name);
  drop fully-done rows, write a pruned temp collection for partial ones. A dir
  without group metadata (crash mid-write) counts as incomplete and re-runs.
  --overwrite bypasses the check; default --stages is predict,eval.

Point _mark_done at the {ckpt}/embeddings/ path so completion detection matches
the nested layout (d89f9ed).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Add the merged organelle_remodeling collection (9 experiments: SEC61B/TOMM20/
G3BP1 reporters under ZIKV/DENV, one experiment per dataset, all prepared on
VAST with normalization + focus_slice). Includes 2026_03_24_A549_SEC61_ZIKV
(re-concatenated + QC'd clean, mantis_v2 at 0.1133/0.16995 um); 04_21 G3BP1 DENV
stays deferred.

Repoint the matrix configs at the new progressive-collection workflow:
- organelle_remodeling.yml matrix: one row per MODEL (DynaCLR-2D-MIP-BoC single
  marker + MorphEm-frozen foundation baseline) over the shared collection;
  focus-centered Z (z_window 16, focus_channel Phase3D, reference_pixel_size_z_um
  0.174); output root on intracellular_dashboard.
- example.yml: document model_type foundation rows, focus-centered vs fixed Z,
  and skip-existing defaults.
- 07_01 collection: add the Phase3D channel.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
…ription

2026_04_21_A549_G3BP1_DENV was re-concatenated to a flat store on VAST (odd
5-assemble layout resolved) and verified predict-ready. Note the residual
z_focus=0 frames (12/54 FOVs, mean 2.4 timepoints each).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Add audit_focus_slice() + a `qc audit-focus` CLI command that reads already-
written focus_slice.{channel}.per_timepoint metadata and reports where in-focus
detection landed at a stack edge (z == 0 or z == Z-1), the signature of a failed
search on a 3D stack. Z-depth-aware: a 2D acquisition (Z == 1) trivially focuses
at slice 0 for every timepoint, so it is reported as 2D with zero flags rather
than misclassifying every frame as failed.

Returns per-FOV suspect counts, dataset totals, and the valid (non-edge) focus
distribution — the summary previously computed ad hoc while vetting datasets for
focus-centered predict.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
embedding_store writes .../{ckpt}/embeddings/{marker}.zarr since the embeddings/
nesting landed (d89f9ed), but iter_embeddings still globbed .../{ckpt}/*.zarr —
so it returned [] and ALL cross-dataset pooling (embedding-consistency-qc, MMD,
linear classifiers) silently found zero embeddings. Add the missing EMBEDDINGS_DIR
segment; fix the test_paths fixtures that encoded the pre-nesting layout.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
…ling, temporal-std

Extend the per-marker embedding-consistency QC:
- split_by: partition datasets by a per-dataset obs column (e.g. microscope) into
  within-group + cross-group blocks; degenerate blocks (single-dataset within, or
  empty cross side) are skipped with a log line.
- metrics knob: choose any of pearson/mmd/frechet (default all three). MMD pass is
  skipped when not requested.
- Fréchet (mean+covariance) matrix: 2-Wasserstein between Gaussian summaries of each
  dataset's control cells — richer than Pearson-of-means, cheaper than full MMD.
- Time-aware Pearson (pearson_hpi_bin_hours): mean per hours_post_perturbation bin
  then mean-of-means, so uneven time sampling can't masquerade as a batch effect;
  plus a per-dataset temporal-std drift diagnostic (std of the control centroid
  across HPI bins).
- Annotated, auto-scaled correlation heatmaps.

Organelle-box recipe (metrics: [pearson], split_by: microscope, 2 h HPI bins).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
…tions; build-collection skill

Add per-experiment microscope (mantis_v1 for the 0.1494 um/px dataset, mantis_v2 for
the 0.1133 ones) to organelle_remodeling so obs enrichment writes it and the
consistency QC can split v1/v2. Normalize the 2024_11_07 control label mock→uninfected
in both organelle_remodeling and the source organelle-box collection so a single
uninfected filter catches every dataset's controls. Update the airtable-build-collection
skill to always populate microscope (field table, schema, derivation rule).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
plot_corr_matrix auto-scaled vmin to each matrix's own off-diagonal minimum, so
heatmaps for different markers used different colour scales and couldn't be
compared by eye. Use a shared fixed vmin (default 0.8). Fix the title
("mean-embedding" -> "control-cell summary correlation").

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Add control_normalization.py: robust z-score of embeddings against the
control (uninfected) population of the same plate and HPI bin. Stores only
per-(plate, bin) median/IQR statistics and applies (x - median) / IQR on the
fly rather than materializing a normalized array.

- control_reference_stats: per-experiment median + IQR of control cells,
  pooled across control wells, in fixed-width HPI bins anchored at 0h.
- control_reference_stats_multi: same at several bin widths (default 1h + 2h).
- ControlReference.apply: robust z-score against the matched bin, nearest
  occupied bin as fallback; zero-IQR dimensions floored to 1.0.
- Raises if a plate has cells but no controls (no silent drop).

8 unit tests cover recovery of the control center, control/perturbed
separation, nearest-bin fallback, zero-IQR flooring, multi-bin widths, and
the control-less-plate guard.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Standalone README next to control_normalization.py documenting the empirical
finding so a teammate knows when NOT to use it: it flattens control temporal
drift (−32 to −53% control-centroid std across 3 plates) but LOWERS held-out
infection/remodeling classifier AUROC on every ZIKV DynaCLR classifier tested
(−0.008 to −0.032), because flattening control-relative time removes
infection-trajectory signal. Per-dimension only (not multivariate batch
correction). Full write-up under .ed_planning/dynaclr/batch_correction/.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
…ssifiers

Add a control_normalize flag (+ control_normalize_bin_hours, default 2.0) to
LinearClassifiersStepConfig and wire it into run-linear-classifiers: when set,
embeddings are robustly z-scored per plate/HPI-bin against control cells before
training/scoring, via viscy_utils.evaluation.control_normalization.

Off by default and backward-compatible. It is off because the held-out A/B
showed it lowers infection/remodeling AUROC (see control_normalization_README);
the flag exists to reproduce that result and for cases where matched-time
cross-condition comparability is the actual goal.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
edyoshikun pushed a commit that referenced this pull request Aug 7, 2026
edyoshikun and others added 15 commits August 12, 2026 15:15
Segment cells from the projected virtual-stain membrane with Cellpose
CP-DINO, assign tracked nuclei to cells, derive cytoplasm masks, and
measure per-cell fluorescence for track eligibility. Includes the
0.58 um recipes (April pilot and organelle_remodeling rollout), the
per-FOV Slurm array scripts, the review tools behind the pilot
diagnostics, and the recipe doc. The reader accepts OME-Zarr identity
transforms used by legacy tracking stores.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Fit the pooled pAL17 teacher used for pAL-anchored alignment: per-dataset
control median/MAD normalization, pooled PCA80, an RBF witness against
controls, and an all-cell joint control+ZIKV GMM with tied covariance and
0.8/0.2 posterior gates. Leave-one-dataset-out pAL->pAL and pAL->Phase
classifiers measure agreement with the teacher. The threshold sweep
writes predictions_by_threshold.parquet, the per-cell posterior table
that the onset alignment reads.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Align ZIKV organelle remodeling to each lineage's pAL response. Track
segments are grouped into parent-linked families within dataset and FOV,
descendants are collapsed by median pAL posterior, and tau=0 is the first
of three frames with posterior >=0.8 after three frames <=0.2. SEC61B,
G3BP1, and TOMM20 embeddings are centered on the smoothed exact-HPI
control median, scaled by the control MAD, and reduced to PCA80.
Null-standardized MMD then compares HPI and tau on the same onset-bearing
cohort in 30-minute bins.

quantify_pal_alignment_gain.py computes the spline-fit alignment metrics,
and bootstrap_pal_alignment_gain.py resamples whole families within
dataset, well, and condition.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Plot pAL posterior curves on the HPI and tau axes, onset support, and
five-bin organelle-divergence calls. The DENV module holds the shared
plotting functions, and the ZIKV script reuses them. The per-dataset
audit freezes normalization, PCA, bandwidth, and onsets, reconstructs the
pooled curves, and then compares each marker's datasets individually.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Render the HPI-versus-tau MMD figure, the per-marker lineage montages
sampled every 3 hours from tau=-9 to +9 h, and the shared organelle UMAP.
The assembler combines the ZIKV and DENV panels into the pseudotime paper
figure under paper_figure_pseudotime/.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

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.

3 participants