46f246dc334a47ded8a439de133f6d94ef9dae81 hiram Thu May 7 14:40:00 2026 -0700 now working correctly with UCSC database assemblies for pushing the lift.over file out to hgdownload refs #31811 diff --git src/hg/utils/otto/userRequests/chainNetTrackDb.pl src/hg/utils/otto/userRequests/chainNetTrackDb.pl index 0930bf728a3..fd7c05f260f 100755 --- src/hg/utils/otto/userRequests/chainNetTrackDb.pl +++ src/hg/utils/otto/userRequests/chainNetTrackDb.pl @@ -62,53 +62,53 @@ printf STDERR "ERROR: must be run from a build directory; no %s/ in cwd %s\n", $axtChain, getcwd(); exit 255; } # normalize query - strip _asmName suffix for GenArk my $qAcc = $queryDb; if ($queryDb =~ /^(GC[AF]_\d+\.\d+)/) { $qAcc = $1; } my $Query = ucfirst($qAcc); ############################################################################## # look up target metadata from dbDb ############################################################################## -my $tRow = `hgsql -N -e 'SELECT organism,scientificName,taxId,description FROM dbDb WHERE name="$targetDb"' hgcentraltest 2>/dev/null`; +my $tRow = `/cluster/bin/x86_64/hgsql -N -e 'SELECT organism,scientificName,taxId,description FROM dbDb WHERE name="$targetDb"' hgcentraltest 2>/dev/null`; chomp $tRow; if (length($tRow) < 1) { printf STDERR "ERROR: target db '%s' not found in hgcentraltest.dbDb\n", $targetDb; exit 255; } my ($tOrganism, $tSciName, $tTaxId, $tDesc) = split(/\t/, $tRow); $tOrganism = "" if (!defined $tOrganism); ############################################################################## # look up query metadata ############################################################################## my $qOrganism = ""; my $qSciName = ""; my $qTaxId = ""; my $qDate = ""; my $qAsmName = ""; if ($qAcc =~ /^GC[AF]_/) { # GenArk: get commonName/scientificName/taxId/asmName from the genark # table; only fall back to assembly_report.txt for the assembly date, # which the genark table does not carry. - my $gRow = `hgsql -N -e 'SELECT commonName,scientificName,taxId,asmName FROM genark WHERE gcAccession="$qAcc"' hgcentraltest 2>/dev/null`; + my $gRow = `/cluster/bin/x86_64/hgsql -N -e 'SELECT commonName,scientificName,taxId,asmName FROM genark WHERE gcAccession="$qAcc"' hgcentraltest 2>/dev/null`; chomp $gRow; if (length($gRow) < 1) { printf STDERR "ERROR: GenArk accession '%s' not found in hgcentraltest.genark\n", $qAcc; exit 255; } ($qOrganism, $qSciName, $qTaxId, $qAsmName) = split(/\t/, $gRow); $qOrganism = "" if (!defined $qOrganism); $qSciName = "" if (!defined $qSciName); $qTaxId = "" if (!defined $qTaxId); $qAsmName = "" if (!defined $qAsmName); # commonName may be empty; fall back to scientificName if (length($qOrganism) < 1) { $qOrganism = $qSciName; } @@ -124,31 +124,31 @@ chomp $asmReport; if (! -s $asmReport) { $asmReport = `ls -d $ncbiPath/${qAcc}*/${qAcc}*assembly_report.txt 2>/dev/null | head -1`; chomp $asmReport; } if (-s $asmReport) { my $ymd = `grep -i 'date:' $asmReport | head -1 | tr -d '\r' | sed -e 's/.*date: *//i;'`; chomp $ymd; if ($ymd =~ /^(\d{4})-(\d{1,2})/) { my ($y, $m) = ($1, $2 + 0); $qDate = sprintf("%s %d", $months[$m], $y) if ($m >= 1 && $m <= 12); } } } else { # UCSC native: dbDb has organism, sciName, taxId, description - my $qRow = `hgsql -N -e 'SELECT organism,scientificName,taxId,description FROM dbDb WHERE name="$qAcc"' hgcentraltest 2>/dev/null`; + my $qRow = `/cluster/bin/x86_64/hgsql -N -e 'SELECT organism,scientificName,taxId,description FROM dbDb WHERE name="$qAcc"' hgcentraltest 2>/dev/null`; chomp $qRow; if (length($qRow) < 1) { printf STDERR "ERROR: query db '%s' not found in hgcentraltest.dbDb\n", $qAcc; exit 255; } my $desc; ($qOrganism, $qSciName, $qTaxId, $desc) = split(/\t/, $qRow); $qOrganism = "" if (!defined $qOrganism); # dbDb.description is typically the assembly date string, e.g. "Apr. 2017" $qDate = defined($desc) ? $desc : ""; } ############################################################################## # probe axtChain/ for available files ##############################################################################