de23dd389f8e8e35c41880a85d74e9838a4df8e4 angie Thu Jun 18 15:11:49 2026 -0700 ssh to hgwdev for commands that need access to hgwdev-only directories, because these scripts run elsewhere now. Tweak shell variables usherDir and friends to make it easier to try out different build directories. diff --git src/hg/utils/otto/dengue/buildTree.sh src/hg/utils/otto/dengue/buildTree.sh index 9afe9f3b2c1..5e7f9f5a530 100755 --- src/hg/utils/otto/dengue/buildTree.sh +++ src/hg/utils/otto/dengue/buildTree.sh @@ -1,33 +1,32 @@ #!/bin/bash source ~/.bashrc set -beEu -o pipefail # Align INSDC sequences to references and build 4 trees, one for each subtype 1-4. dengueScriptDir=$(dirname "${BASH_SOURCE[0]}") today=$(date +%F) dengueDir=/hive/data/outside/otto/dengue dengueNcbiDir=$dengueDir/ncbi/ncbi.latest -usherDir=~angie/github/usher -usherSampled=$usherDir/build/usher-sampled -usher=$usherDir/build/usher -matUtils=$usherDir/build/matUtils -matOptimize=$usherDir/build/matOptimize +usherDir=~angie/github/usher/build +usherSampled=$usherDir/usher-sampled +matUtils=$usherDir/matUtils +matOptimize=$usherDir/matOptimize # Subtype 1 asmAcc1=GCF_000862125.1 gbff1=$dengueDir/NC_001477.1.gbff refFa1=$dengueDir/NC_001477.1.fa archiveRoot1=/hive/users/angie/publicTreesDenv1 # Subtype 2 asmAcc2=GCF_000871845.1 gbff2=$dengueDir/NC_001474.2.gbff refFa2=$dengueDir/NC_001474.2.fa archiveRoot2=/hive/users/angie/publicTreesDenv2 # Subtype 3 asmAcc3=GCF_000866625.1 @@ -184,61 +183,62 @@ > hgPhyloPlace.description.$subtype.txt # Make a taxonium view usher_to_taxonium --input denv$subtype.$today.pb \ --metadata denv$subtype.$today.metadata.tsv.gz \ --columns genbank_accession,country,location,date,authors,Nextclade_lineage \ --genbank $gbff \ --name_internal_nodes \ --title "Dengue subtype "$subtype" $today tree with $sampleCountComma genomes from INSDC" \ --output denv$subtype.$today.taxonium.jsonl.gz \ >& usher_to_taxonium.$subtype.log # Update links in /gbdb nc=$(basename $gbff .gbff) dir=/gbdb/wuhCor1/hgPhyloPlaceData/dengue/$nc - mkdir -p $dir - ln -sf $(pwd)/denv$subtype.$today.pb $dir/denv$subtype.latest.pb - ln -sf $(pwd)/denv$subtype.$today.metadata.tsv.gz $dir/denv$subtype.latest.metadata.tsv.gz - ln -sf $(pwd)/hgPhyloPlace.description.$subtype.txt $dir/denv$subtype.latest.version.txt + ssh hgwdev mkdir -p $dir + ssh hgwdev ln -sf $(pwd)/denv$subtype.$today.pb $dir/denv$subtype.latest.pb + ssh hgwdev ln -sf $(pwd)/denv$subtype.$today.metadata.tsv.gz $dir/denv$subtype.latest.metadata.tsv.gz + ssh hgwdev ln -sf $(pwd)/hgPhyloPlace.description.$subtype.txt $dir/denv$subtype.latest.version.txt # Extract Newick and VCF for anyone who wants to download those instead of protobuf $matUtils extract -i denv$subtype.$today.pb \ -t denv$subtype.$today.nwk \ -v denv$subtype.$today.vcf >& tmp.log pigz -p 8 -f denv$subtype.$today.nwk denv$subtype.$today.vcf # Link to public trees download directory hierarchy read y m d < <(echo $today | sed -re 's/-/ /g') archive=$archiveRoot/$y/$m/$d mkdir -p $archive ln -f $(pwd)/denv$subtype.$today.{nwk,vcf,metadata.tsv,taxonium.jsonl}.gz $archive/ gzip -c denv$subtype.$today.pb > $archive/denv$subtype.$today.pb.gz ln -f $(pwd)/hgPhyloPlace.description.$subtype.txt $archive/denv$subtype.$today.version.txt # Update 'latest' in $archiveRoot for f in $archive/denv$subtype.$today.*; do latestF=$(echo $(basename $f) | sed -re 's/'$today'/latest/') ln -f $f $archiveRoot/$latestF done # Update hgdownload-test link for archive asmDir=$(echo $asmAcc \ | sed -re 's@^(GC[AF])_([0-9]{3})([0-9]{3})([0-9]{3})\.([0-9]+)@\1/\2/\3/\4/\1_\2\3\4.\5@') - mkdir -p /data/apache/htdocs-hgdownload/hubs/$asmDir/UShER_DENV-$subtype/$y/$m - ln -sf $archive /data/apache/htdocs-hgdownload/hubs/$asmDir/UShER_DENV-$subtype/$y/$m + ssh hgwdev ln -sf $archiveRoot/*.latest.* /data/apache/htdocs-hgdownload/hubs/$asmDir/UShER_DENV-$subtype/ # rsync to hgdownload hubs dir - for h in hgdownload1 hgdownload3; do - if rsync -a -L --delete /data/apache/htdocs-hgdownload/hubs/$asmDir/UShER_DENV-$subtype/* \ + for h in hgdownload1 hgdownload2 hgdownload3; do + if ssh hgwdev rsync -a -L --delete /data/apache/htdocs-hgdownload/hubs/$asmDir/UShER_DENV-$subtype/* \ qateam@$h:/mirrordata/hubs/$asmDir/UShER_DENV-$subtype/; then true else echo "" echo "*** rsync to $h failed; disk full? ***" echo "" fi done done rm -f mutation-paths.txt *.pre*.pb final-tree.nh nice gzip -f *.log *.tsv move_log* *.stderr samples.* + +echo All done.