9949a453819bff3ae00234d5f65b73c903ea4b2f
angie
  Fri Aug 28 08:13:40 2026 -0700
Replace non-Pango extra labels with Pango labels before pangolin test runs because some new extra labels on older split lineages were causing regex failure in pangolin.  Remove the BA.5.1_no29666 branch because it's always problematic.

diff --git src/hg/utils/otto/sarscov2phylo/updateLineageTreePb.sh src/hg/utils/otto/sarscov2phylo/updateLineageTreePb.sh
index f8c9984ca43..01396ed5abe 100755
--- src/hg/utils/otto/sarscov2phylo/updateLineageTreePb.sh
+++ src/hg/utils/otto/sarscov2phylo/updateLineageTreePb.sh
@@ -109,42 +109,69 @@
     -P lineageToPath.reroot.pangoMasked \
     -M pango.clade-mutations.reroot.tsv \
     -l \
     -c lineageToName \
     -f 0.95 \
     -u mutations.pangoOnly \
     -D details.pangoOnly \
     -o gisaidAndPublic.$buildDate.masked.reroot.pangoOnly.pb.gz \
     >& annotate.pangoOnly.out
 
 set +o pipefail
 grep 'Could not' annotate.pangoOnly.out | cat
 grep skip annotate.pangoOnly.out | cat
 set -o pipefail
 
-# Make a bunch of smaller trees and see how they do.
+# Make candidate subtrees.  Remove BA.5.1_no29666 because it's always a problematic mini-BA.5.1;
+# then reassign all extra labels (for potential recombinants and sublineages) to valid Pango
+# labels so we don't get a regex failure when running pangolin.
 mkdir -p /hive/users/angie/lineageTreeUpdate.$today
 cd /hive/users/angie/lineageTreeUpdate.$today
 for i in 0 1 2 3 4 5 6 7 8 9; do
     echo test.50.$i
     $matUtils extract -i $ottoDir/$buildDate/gisaidAndPublic.$buildDate.masked.reroot.pangoOnly.pb.gz \
         -r 50 -o test.50.$i.pb
     $matUtils mask -i test.50.$i.pb -S -o test.50.$i.simp.pb
+    $matUtils extract -i test.50.$i.simp.pb -p -c BA.5.1_no29666 -o test.50.$i.simp.tmp.pb
+    $matUtils extract -i test.50.$i.simp.tmp.pb -C clade-paths.$i.tmp
+    tail -n+2 clade-paths.$i.tmp \
+    | cut -f 1,2 \
+    | sed -re 's/miscBA[A-Za-z0-9]+/BA.2/;
+               s/miscDeltaBA1[A-Za-z0-9]+/BA.1/;
+               s/miscBA.5.2CJ.1/CJ.1/;
+               s/miscBA.5BA.2.75/BA.5/;
+               s/proposed422/BA.1/;
+               s/proposed437/BA.1/;
+               s/proposed439/BA.1.1/;
+               s/proposed441/BA.1/;
+               s/proposed446/BA.1.1/;
+               s/proposed455/BA.1/;
+               s/proposed467/BA.2/;
+               s/proposed482/BA.2/;
+               s/proposed882/BA.2/;
+               s/proposed885/BA.2/;
+               s/proposed911/BA.5/;
+               s/proposed1006/BA.2/;
+               s/proposed1137/BA.5/;
+               s/([A-Z\.0-9]+)_[A-Za-z0-9_]+/\1/;' \
+        > cladeNodes.reassign
+    $matUtils annotate -i test.50.$i.simp.tmp.pb -l -C cladeNodes.reassign -o test.50.$i.simp.pb
+    rm test.50.$i.simp.tmp.pb clade-paths.$i.tmp cladeNodes.reassign
 done
 
 # Run pangolin on each subtree
-# 7.5-14.5m each job, ~3.5hrs total:
+# About 1 minute per job
 conda activate pangolin
 for i in 0 1 2 3 4 5 6 7 8 9; do
     echo test.50.$i.simp
     time pangolin -t 80 --usher-tree test.50.$i.simp.pb --skip-scorpio \
         --skip-designation-cache --no-temp --outdir subset_10000_0.pusher.test.50.$i.simp.out \
         ../pangolin_eval/subset_10000_0.fa
 done
 
 # Summarize results
 for i in 0 1 2 3 4 5 6 7 8 9; do
     echo test.50.$i.simp
     tail -n+2 subset_10000_0.pusher.test.50.$i.simp.out/lineage_report.csv \
     | awk -F, '{print $1 "\t" $2;}' \
     | sort \
         > subset_10000_0.pusher.test.50.$i.simp