70e26b4a27b71aa4844ae0a5aa995e732f8b17e4
hiram
  Mon Apr 11 21:51:12 2022 -0700
correct finding queryId report.txt file refs #29203

diff --git src/hg/utils/automation/asmHubChainNet.pl src/hg/utils/automation/asmHubChainNet.pl
index a2d6bc4..7c6f771 100755
--- src/hg/utils/automation/asmHubChainNet.pl
+++ src/hg/utils/automation/asmHubChainNet.pl
@@ -23,31 +23,31 @@
 my $dbHost = "hgwdev";
 
 my $asmId = shift;
 my $namesFile = shift;
 my $queryId = shift;
 my $hubUrl = shift;
 
 # if assembly hub, need to find the real full assembly ID
 if ($queryId =~ m/^GC/) {
   my $gcX = substr($queryId,0,3);
   my $d0 = substr($queryId,4,3);
   my $d1 = substr($queryId,7,3);
   my $d2 = substr($queryId,10,3);
   my $hubBuildDir = "refseqBuild";
   $hubBuildDir = "genbankBuild" if ($gcX eq "GCA");
-  $queryId = `ls -d /hive/data/genomes/asmHubs/$hubBuildDir/$gcX/$d0/$d1/$d2/${gcX}*`;
+  $queryId = `ls -d /hive/data/genomes/asmHubs/$hubBuildDir/$gcX/$d0/$d1/$d2/${queryId}*`;
   chomp $queryId;
   $queryId =~ s#.*/##;
 }
 
 my $ncbiAssemblyId = `grep -v "^#" $namesFile | cut -f10`;
 chomp $ncbiAssemblyId;
 my $sciName = `grep -v "^#" $namesFile | cut -f5`;
 chomp $sciName;
 
 my ($tGenome, $tDate, $tSource) = &HgAutomate::getAssemblyInfo($dbHost, $asmId);
 my ($qGenome, $qDate, $qSource) = &HgAutomate::getAssemblyInfo($dbHost, $queryId);
 
 print <<_EOF_
 <h2>Description</h2>
 <p>