Conversation
|
Claude Code: PR #40 — PMSR (Posterior Mean Site Rate) ModelStatus: Draft | 2,386 additions / 1,475 deletions across 42 files What It DoesExtends the existing PMSF (Posterior Mean Site Frequency) workflow to also support per-site rates. Three new modes:
The core change is that Alignment gains a ptn_rate_scaler vector (one rate multiplier per pattern) alongside the existing ptn_state_freq, and ModelSet is extended to use both. Key Changes
Issues That Should Block Merge1. Memory aliasing / double-free in ptn_state_freq 2. ptn_rate_scaler not checkpointed 3. Tree mutation inside ModelSet constructor 4. Partition model + SSR — no guard 5. RateHeterogeneity(nullptr) null dereference Issues Worth Addressing
Positives
VerdictNot ready to merge in current draft state. The core logic is correct, but the five structural issues (memory aliasing, missing checkpoint, constructor side-effects, partition incompatibility, null dereference) need to be resolved first. The 42-file scope and architectural changes to Alignment, ModelSet, and RateHeterogeneity warrant careful review of memory management and checkpoint correctness paths. |
This pull request adapts the iqtree/iqtree2#391 PR for IQ-Tree 3.
Commits of the original PR were directly transferred, with only minor changes introduced for the sake of compatibility and small bug fixing.