bb1f29a4c6d5222beb5d51c05486fefaa763da51 jnavarr5 Wed Apr 15 13:27:07 2026 -0700 Printing out how to force the update if the itemCheck fails for genCC, no Redmine diff --git src/hg/utils/otto/genCC/doGenCC.py src/hg/utils/otto/genCC/doGenCC.py index 9c10b3e173a..501a6c28cec 100644 --- src/hg/utils/otto/genCC/doGenCC.py +++ src/hg/utils/otto/genCC/doGenCC.py @@ -295,35 +295,36 @@ return(True) elif args.force: # Previous file matches current file, but update didn't go through # because of itemCounts check. return(True) else: return(False) def checkItemCounts(oldBb, newBb): """Compare item counts between old and new bigBed files. Exit if difference > 10%.""" oldItemCount = bash('bigBedInfo '+oldBb+' | grep "itemCount"') oldItemCount = int(oldItemCount.rstrip().split("itemCount: ")[1].replace(",","")) newItemCount = bash('bigBedInfo '+newBb+' | grep "itemCount"') newItemCount = int(newItemCount.rstrip().split("itemCount: ")[1].replace(",","")) if abs(newItemCount - oldItemCount) > 0.1 * max(newItemCount, oldItemCount): - msg = "Item count difference >10% for "+newBb+":\nold="+str(oldItemCount)+" new="+str(newItemCount) + msg = "WARNING:\nItem count difference >10% for "+newBb+":\nold="+str(oldItemCount)+" new="+str(newItemCount) + print(msg) if args.force: - print("WARNING:\n"+msg+"\n(continuing due to QA approval)") + print("(continuing due to QA approval)") else: - sys.exit(msg) + sys.exit("Run ./doGenCC.py --force if you approve the item count change.") print(oldBb+" old: "+str(oldItemCount)+" new: "+str(newItemCount)) if checkIfUpdateIsNeeded(): date = str(datetime.now()).split(" ")[0] workDir = "/hive/data/outside/otto/genCC/"+date bash("mkdir -p "+workDir) hg19outPutFile = workDir+"/hg19genCC.bed" hg38outPutFile = workDir+"/hg38genCC.bed" bash("cp /hive/data/outside/otto/genCC/newSubmission.tsv "+workDir) genCCtsvFile = "/hive/data/outside/otto/genCC/newSubmission.tsv" # Auto-detect latest GENCODE Comprehensive tables gencodeHg38 = getLatestGencodeTable('hg38', 'wgEncodeGencodeComp%') gencodeHg19 = getLatestGencodeTable('hg19', 'wgEncodeGencodeComp%lift37')