SH-aLRT: draw RELL replicates as bootstrap samples whatever -j/-J selected (#198) - #214
SH-aLRT: draw RELL replicates as bootstrap samples whatever -j/-J selected (#198)#214cindykrafft wants to merge 1 commit into
Conversation
bqminh
left a comment
There was a problem hiding this comment.
Can you remove the CI stuffs? This is not really the intension of the CI.
The CI is not really meant to be extensive test suite. It's only to check a few most popular use cases by users, that should mimic functionality of IQ-TREE v2. We also want to build binaries, so that some users can download and early beta test it, before releasing. The CI has to run quick enough, right now keeping ~20 min. We don't want to make it run longer.
If you want more testing, then this needs to be done with other means. You can post some input files and commands to reproduce it with the PR, if you want.
…ected (iqtree#198) PhyloTree::resampleLh() builds the RELL replicates of the SH-aLRT test (and of the local bootstrap probability, -lbp) with Alignment::createBootstrapAlignment(), which follows the global --jack-prop setting. With -j or -J every replicate was therefore a delete-half jackknife sample: a sum over half the sites, whose expectation is half the full-alignment log-likelihood. The statistics lh_new - lh in testOneBranch() were then no longer centred and the support of every branch moved; on the turtle test data the nine SH-aLRT values 98.4 89.8 98.2 61.7 47.6 47.9 98 100 81.1 (-B 1000 -alrt 1000) became 100 100 100 91.7 86 81.5 100 100 99.7 with -J 1000 -alrt 1000 on the same tree and seed. random_resampling() and createBootstrapAlignment(int*, ...) take an optional jackknife proportion (negative, the default, keeps using the global setting); resampleLh() passes 0 so the SH-aLRT replicates are bootstrap samples, as in Guindon et al. (2010) and Adachi and Hasegawa (1996), while the tree-search resampling of -j/-J is unchanged. The GENE/GENESITE/SCALE= paths are unaffected. Commands that show the difference are in the pull request description; they use test_scripts/test_data/turtle.fa and need no extra input files. Assisted-by: Claude:claude-fable-5-1 Signed-off-by: Cynthia Krafft <cynthiacondra@gmail.com>
e8ca14f to
04f8184
Compare
|
Understood! I have removed the Here is the reproduction instead. It needs no extra input files: it uses Both runs find the same ML tree with the same log-likelihood (-5370.3730), so the SH-aLRT values
The UFBoot and UFJack support values themselves are unchanged by the patch, on this data A second check on simulated data (AliSim, 24 taxa, JC, 800 sites, Happy to run anything else you would like to see before merging. Generated by Claude Code |
Fixes #198.
PhyloTree::resampleLh()builds the RELL replicates of the SH-aLRT test (and of-lbp) withAlignment::createBootstrapAlignment(), which follows the global--jack-propsetting. With-jor
-Jevery replicate was therefore a delete-half jackknife sample: a sum over half the sites,whose expectation is half the full-alignment log-likelihood. The statistics
lh_new - lhintestOneBranch()were then no longer centred, and the support of every branch moved. Ontest_scripts/test_data/turtle.fawith the test seed:-B 1000 -alrt 1000-J 1000 -alrt 1000(before)-J 1000 -alrt 1000(after)An independent numpy implementation of the
testOneBranch()rule on IQ-TREE's own sitelog-likelihoods gives the same picture on a simulated 24-taxon alignment: bootstrap RELL 60.3 /
54.6 / 74.6 / 85.8 on four branches, delete-half jackknife RELL 74.0 / 82.9 / 97.6 / 100.0, and
the jackknife pseudo-value (weights × 2, expectation restored) 57.5 / 53.8 / 74.0 / 85.1 — the
inflation is the missing centring, not sampling noise
(https://github.com/cindykrafft/mytochondria/tree/main/audits/iqtree/issue-fixes/198-sh-alrt-jackknife).
Change:
random_resampling()andcreateBootstrapAlignment(int*, ...)(Alignment andSuperAlignment) take an optional jackknife proportion, negative by default meaning "the global
setting", and
resampleLh()passes 0 so the SH-aLRT replicates are bootstrap samples as inGuindon et al. (2010) and Adachi & Hasegawa (1996). The tree-search resampling of
-j/-Jisuntouched (UFJack and UFBoot values are bit-identical before and after), as are the
GENE/GENESITE/SCALE=paths. If you would rather keep jackknife replicates and rescale them(
lh_new / (1 - jack_prop)), that is a two-line variant of the same change; I went with thedefinition of the test.
Test:
test_iqtree.sh/.ps1runturtle.fawith-B 1000 -alrt 1000and with-J 1000 -alrt 1000and fail if the SH-aLRT labels differ (they do onmaster); twoexpect_ans.txtrows forthe log-likelihoods. The full
test_iqtree.sh+verify_results.shpass locally with the change.Not changed here, same pattern: the RELL replicates of the tree topology tests (
--test, KH/SHand the weighted variants in
treetesting.cpp) also follow--jack-prop, and the AU test stopswith "Unsupported jackknife with SCALE=" when
-j/-Jis given. Happy to send that as afollow-up if you agree it should behave the same way. #196 (the
--jack-propwording) alreadyhas its fix on
master(b8ef423) and could be closed.Generated by Claude Code