efdf71bc99d33cb9fc9327b8b8e05244dab81e08 angie Fri Aug 28 08:29:52 2026 -0700 Scan the tree for split lineages, excluding some highly recurrent mutations. diff --git src/hg/utils/otto/sarscov2phylo/updateCombinedTree.sh src/hg/utils/otto/sarscov2phylo/updateCombinedTree.sh index 61bb0df9542..cc6299d94b1 100755 --- src/hg/utils/otto/sarscov2phylo/updateCombinedTree.sh +++ src/hg/utils/otto/sarscov2phylo/updateCombinedTree.sh @@ -1,16 +1,18 @@ #!/bin/bash +source ~/.bashrc +conda activate bte set -beEu -x -o pipefail # Do not modify this script, modify the source tree copy: # kent/src/hg/utils/otto/sarscov2phylo/updateCombinedTree.sh usage() { echo "usage: $0 prevDate today problematicSitesVcf [baseProtobuf]" echo "This assumes that ncbi.latest and cogUk.latest links/directories have been updated." } if (( $# != 3 && $# != 4 )); then usage exit 1 fi @@ -184,33 +186,30 @@ # Extract Omicron-only tree for faster searches $matUtils extract -i gisaidAndPublic.$today.masked.pb.gz -c B.1.1.529 \ -o gisaidAndPublic.$today.masked.omicron.pb.gz \ -u samples.$today.omicron pigz -f -p 8 samples.$today.omicron ssh hgwdev ln -sf $(pwd)/gisaidAndPublic.$today.masked.omicron.pb.gz \ /gbdb/wuhCor1/hgPhyloPlaceData/public.plusGisaid.latest.masked.omicron.pb.gz sampleCountComma=$(echo $(zcat samples.$today.omicron.gz | wc -l) \ | sed -re 's/([0-9]+)([0-9]{3})$/\1,\2/; s/([0-9]+)([0-9]{3},[0-9]{3})$/\1,\2/;') echo "$sampleCountComma Omicron genomes from GISAID, GenBank, COG-UK and CNCB ($today); sarscov2phylo 13-11-20 tree with newer sequences added by UShER" \ > hgPhyloPlace.plusGisaid.omicron.description.txt ssh hgwdev ln -sf $(pwd)/hgPhyloPlace.plusGisaid.omicron.description.txt \ /gbdb/wuhCor1/hgPhyloPlaceData/public.plusGisaid.latest.omicron.version.txt # Extract recent-only tree (samples from the past year plus samples within radius 5 of those) for faster searches -set +x -conda activate bte -set -x python $scriptDir/find_recent_samples.py -i gisaidAndPublic.$today.metadata.tsv.gz -n 365 -o recent_samples.txt python $scriptDir/prune_to_radius.py -i gisaidAndPublic.$today.masked.pb.gz -l recent_samples.txt -r 5 \ -o samples.$today.recent $matUtils extract -i gisaidAndPublic.$today.masked.pb.gz \ -s samples.$today.recent \ -o gisaidAndPublic.$today.masked.recent.pb.gz pigz -f -p 8 samples.$today.recent ssh hgwdev ln -sf $(pwd)/gisaidAndPublic.$today.masked.recent.pb.gz \ /gbdb/wuhCor1/hgPhyloPlaceData/public.plusGisaid.latest.masked.recent.pb.gz sampleCountComma=$(echo $(zcat samples.$today.recent.gz | wc -l) \ | sed -re 's/([0-9]+)([0-9]{3})$/\1,\2/; s/([0-9]+)([0-9]{3},[0-9]{3})$/\1,\2/;') echo "$sampleCountComma recent genomes from GISAID, GenBank, COG-UK and CNCB ($today); sarscov2phylo 13-11-20 tree with newer sequences added by UShER" \ > hgPhyloPlace.plusGisaid.recent.description.txt ssh hgwdev ln -sf $(pwd)/hgPhyloPlace.plusGisaid.recent.description.txt \ /gbdb/wuhCor1/hgPhyloPlaceData/public.plusGisaid.latest.recent.version.txt @@ -237,19 +236,26 @@ done # Make Taxonium v2 protobuf for display usher_to_taxonium --input gisaidAndPublic.$today.masked.pb.gz \ --metadata gisaidAndPublic.$today.metadata.tsv.gz \ --genbank ~angie/github/taxonium/taxoniumtools/test_data/hu1.gb \ --columns genbank_accession,country,date,pangolin_lineage,pango_lineage_usher \ --clade_types=nextstrain,pango \ --name_internal_nodes \ --title "$today tree with sequences from GISAID, INSDC, COG-UK and CNCB" \ --output gisaidAndPublic.$today.masked.taxonium.jsonl.gz \ >& utt.log & $scriptDir/extractPublicTree.sh $today $prevDate +# Scan for split lineages +time python ~/kent/src/hg/utils/otto/sarscov2phylo/find_split_lineages.py \ + -i gisaidAndPublic.$today.masked.pb.gz \ + -e G22599C,G22927T,T22928C,A23598G \ + -p pruneForSplitLineages \ + > split_lineages.txt + set +o pipefail grep skipping annotate* | cat # Clean up