39c14307224404251ce37952391cc6b7babea0f7
hiram
  Fri Oct 31 15:47:31 2025 -0700
with specific fasTAN.as schema definition

diff --git src/hg/utils/automation/doFasTAN.pl src/hg/utils/automation/doFasTAN.pl
index ca992fb7a48..93862cdd666 100755
--- src/hg/utils/automation/doFasTAN.pl
+++ src/hg/utils/automation/doFasTAN.pl
@@ -213,32 +213,37 @@
 
 #########################################################################
 # * step: bedResult [fileServer]
 sub doBedResult {
   my $runDir = "$buildDir";
   if ( ! $opt_debug && -s "$runDir/fasTAN.bb") {
      printf STDERR "# bedResult step already complete\n";
      return;
   }
   my $whatItDoes = "Consolidate the cluster run bed.gz files.  Make single bed and bigBed file.";
   HgAutomate::checkExistsUnlessDebug('cluster', 'cleanup', "$runDir/run.time");
   my $fileServer = $opt_debug ? "hgwdev" : HgAutomate::chooseFileServer($runDir);
   my $bossScript = newBash HgRemoteScript("$runDir/makeBed.bash", $fileServer,
 				      $runDir, $whatItDoes);
   $bossScript->add(<<_EOF_
+if [ -s ~/kent/src/hg/lib/fasTAN.as ]; then
+  cp -p ~/kent/src/hg/lib/fasTAN.as ./
+else
+  wget --no-check-certificate -O fasTAN.as 'https://raw.githubusercontent.com/ucscGenomeBrowser/kent/refs/heads/master/src/hg/lib/fasTAN.as'
+fi
 ls -S result/*.bed.gz | xargs zcat | gzip -c > fasTAN.bed.gz
-bedToBigBed -type=bed5 fasTAN.bed.gz chrom.sizes fasTAN.bb
+bedToBigBed -type=bed3+2 -as=fasTAN.as fasTAN.bed.gz chrom.sizes fasTAN.bb
 export totalBases=`ave -col=2 chrom.sizes | grep total | awk '{printf "%d", \$NF}'`
 export basesCovered=`bigBedInfo fasTAN.bb | grep basesCovered | awk '{printf "%s", \$NF}' | tr -d ','`
 export percentCovered=`echo \$basesCovered \$totalBases | awk '{printf "%.2f", 100*\$1/\$2}'`
 printf "%d bases of %d (%s%%) in intersection\n" "\$basesCovered" "\$totalBases" "\$percentCovered" > fb.fasTAN.txt
 cat fb.fasTAN.txt
 _EOF_
   );
   $bossScript->execute() if (! $opt_debug);
 } #doBedResult
 
 #########################################################################
 # * step: cleanup [fileServer]
 sub doCleanup {
   my $runDir = "$buildDir";
   if ( ! $opt_debug && ( ! -d "$runDir/tmp" && ! -d "$runDir/result")) {