efe79575f0b546414196fb3b8a8871bf5f7611fc max Wed Sep 9 07:16:04 2026 -0700 UniProt otto: stop curl writing its progress bar into the run log The gene2refseq download wrote a few hundred lines of percentages into lastRun.log, which buries the lines that matter. --no-progress-meter drops the bar but keeps errors, unlike the plain -s that was removed here earlier for exactly that reason, and --fail turns an HTTP error into a curl error instead of piping NCBI's error page into zcat and failing with 'not in gzip format'. Not yet installed to /hive: a run is in progress. refs #38300 diff --git src/hg/utils/otto/uniprot/doUniprot src/hg/utils/otto/uniprot/doUniprot index aeeb99b6888..b62b82036e3 100755 --- src/hg/utils/otto/uniprot/doUniprot +++ src/hg/utils/otto/uniprot/doUniprot @@ -2437,32 +2437,36 @@ continue geneId = row.GeneID transId = row.RNA_nucleotide_accession_version if transId!="-": geneToTrans[geneId].add(transId) if lastTax!=taxId and lastTax is not None: writeGeneTsv(geneToTrans, lastTax, outDir) geneToTrans = defaultdict(set) lastTax = taxId writeGeneTsv(geneToTrans, lastTax, outDir) def downloadAndSplitNcbi(taxIdDbs): " download and split the NCBI genes file with a mapping NCBI gene -> RefSeq transcripts " logging.info("Downloading NCBI gene2refseq file gene2refseq.tsv") - # removed -Ss trying to get error messages to show up - cmd = "curl https://ftp.ncbi.nlm.nih.gov/gene/DATA/gene2refseq.gz | zcat > ncbi/gene2refseq.tsv" + # --no-progress-meter, not -s: it drops the progress bar, which otherwise writes a few + # hundred lines of percentages into lastRun.log, but still shows errors. Plain -s would + # hide the errors too, which is why they were dropped here in the first place. + # --fail so an HTTP error is reported as one, instead of piping NCBI's error page into + # zcat and failing with a confusing "not in gzip format" + cmd = "curl --no-progress-meter --show-error --fail https://ftp.ncbi.nlm.nih.gov/gene/DATA/gene2refseq.gz | zcat > ncbi/gene2refseq.tsv" run(cmd) splitGeneRefseq("ncbi/gene2refseq.gz", NCBIDIR, taxIdDbs) def delFlag(): global flagFname if isfile(flagFname): os.remove(flagFname) def main(): global flagFname args, options = parseArgs() onlyDbs = None if options.onlyDbs: