0b095144508cbb36923bacffa0425003f8484042 angie Thu Jun 18 15:21:58 2026 -0700 Simplify creation of pango.clade-mutations.reroot.tsv because matUtils annotate can handle multiple successive mutations at the same position now. diff --git src/hg/utils/otto/sarscov2phylo/updateLineageTreePb.sh src/hg/utils/otto/sarscov2phylo/updateLineageTreePb.sh index 9128b4b4a25..f8c9984ca43 100755 --- src/hg/utils/otto/sarscov2phylo/updateLineageTreePb.sh +++ src/hg/utils/otto/sarscov2phylo/updateLineageTreePb.sh @@ -68,37 +68,32 @@ > pruneRevs $matUtils extract -i $startingTree \ -p -s pruneRevs -O -o gisaidAndPublic.$buildDate.masked.pruneRevs.pb.gz # Get node ID for root of lineage A, used as reference/root by Pangolin: $matUtils extract -i gisaidAndPublic.$buildDate.masked.pruneRevs.pb.gz -C clade-paths.prunedRevs lineageARoot=$(grep ^A$'\t' clade-paths.prunedRevs | cut -f 2) # Reroot protobuf to lineage A and restrict to low mutation density (highly supported nodes): $matUtils extract -i gisaidAndPublic.$buildDate.masked.pruneRevs.pb.gz \ --reroot $lineageARoot \ --max-mutation-density 2 \ -O -o gisaidAndPublic.$buildDate.masked.reroot.pb.gz # Reroot pango.clade-mutations.tsv -grep -w ^A $scriptDir/pango.clade-mutations.tsv \ -| sed -re 's/T28144C( > )?//; s/C8782T( > )?//;' \ +sed -re 's/\t([A-Z][0-9]+[A-Z])/\tT8782C > C28144T > \1/;' $scriptDir/pango.clade-mutations.tsv \ > pango.clade-mutations.reroot.tsv -grep -vw ^A $scriptDir/pango.clade-mutations.tsv \ -| sed -re 's/\t/\tT8782C > C28144T > /;' \ -| sed -re 's/T8782C >([ >ACGTN0-9,]+)C8782T/\1/; s/> +>/>/;' \ - >> pango.clade-mutations.reroot.tsv # Mask additional bases at the beginning and end of the genome that pangolin masks after # aligning input sequences. set +x for ((i=56; $i <= 265; i++)); do echo -e "N${i}N" done > maskPangoEnds for ((i=29674; $i < 29804; i++)); do echo -e "N${i}N" done >> maskPangoEnds set -x $matUtils mask -i gisaidAndPublic.$buildDate.masked.reroot.pb.gz -c \ -m maskPangoEnds -o gisaidAndPublic.$buildDate.masked.reroot.pangoMasked.pb.gz # Preserve lineage annotations that survived rerooting and pango-masking