Repository navigation
Conversation
ziw-liu
marked this pull request as ready for review
May 30, 2023 17:38
edyoshikun
added a commit
that referenced
this pull request
Apr 30, 2026
…ication
Three Path B improvements per the locked execution plan and DAG §7.4:
1. τ_event band stored in template zarr per flavor.
- New compute_tau_event_band() in io.py: half-rise band of the
template's first-derivative magnitude. Pseudotime band [τ_lo, τ_hi]
where ||dT/dτ|| ≥ 0.5 × max||dT/dτ||. Per discussion §3.4: the band
honestly reflects template-derivative resolution; argmax-derivative
has a 1/n_frames floor and DBA flattens cell-specific kinks.
- Stored as tau_event_band[2] in each flavor group.
- New read_tau_event_band() helper. Returns (0.0, 1.0) for templates
built before this feature.
2. length_normalized_cost and path_skew surfaced in AlignmentResult and
the alignment parquet.
- Added as fields on AlignmentResult NamedTuple.
- dtw_align_tracks() now computes both:
* length_normalized_cost = dtw_cost / len(warp_path).
* path_skew = mean L1 deviation of the warp path from the ideal
diagonal, normalized by max(template_len, query_len).
- alignment_results_to_dataframe() writes both as columns so
downstream sweeps can re-gate without re-running DTW.
3. align_cells.py renamed to align_embedding.py; gating + schema
unification.
- Path-skew gate runs FIRST (primary gate per discussion §3.8 #2);
length-normalized cost remains as secondary in min-match filter.
Skew rejects degenerate non-diagonal warps without rejecting
biological rate variance.
- Output dir 2-align_cells/B/alignments/ matches per-track DAG layout.
- estimated_t_rel_minutes renamed to t_rel_minutes_warped.
- New _enrich_with_cohort_metadata() joins lineage_id, cohort,
divides, t_zero from Stage 0's productive cohort CSV; computes
real-time t_rel_minutes; tags track_path = "B". Output now matches
the unified Stage 2 schema across Path A and Path B.
- --candidate-set CLI arg added (defaults to --query-set if omitted).
Defers organelle/phase warp propagation to Stage 3 readouts (Phase 4),
which naturally consumes the alignment parquet.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.