dfac508f415202b72edde722acc394bf3a626f43
braney
  Wed Apr 29 07:11:56 2026 -0700
clinVarToBed: restore r-prefix on backslash-stripping perl cmd

Without the raw-string prefix, Python interprets \\ as a single
backslash and \t as a tab before the command reaches the shell, so
perl saw s/\(?=<TAB>|$)//g instead of s/\\(?=\t|$)//g and the fix
from b1b1215 was a no-op. refs #37477

diff --git src/hg/utils/otto/clinvar/clinVarToBed src/hg/utils/otto/clinvar/clinVarToBed
index 16d550c6841..bf327004cff 100755
--- src/hg/utils/otto/clinvar/clinVarToBed
+++ src/hg/utils/otto/clinvar/clinVarToBed
@@ -579,31 +579,31 @@
 
     if starCount==1:
         asciiDesc = "%d star" % starCount
     else:
         asciiDesc = "%d stars" % starCount
     return htmlStr, asciiDesc, starCount
 
 def loadSubmissions(summFname):
     " load the submissions into the Mysql table for the lollipop track details page "
     # not doing the load+rename strategy yet, I don't think it makes a difference here
     logging.info("Loading submissions table %s into mysql, hg19 and also hg38" % summFname)
     fh = tempfile.NamedTemporaryFile(prefix="clinVarToBed", suffix=".tsv")
     tmpFname = fh.name
     # strip trailing backslashes inside fields so MySQL's LOAD DATA escape
     # interpretation doesn't eat the tab separator (Warning 1261, refs #37477)
-    cmd= "zgrep -v '^#' %s | perl -pe 's/\\(?=\t|$)//g' > %s" % (summFname, tmpFname)
+    cmd= r"zgrep -v '^#' %s | perl -pe 's/\\(?=\t|$)//g' > %s" % (summFname, tmpFname)
     assert(os.system(cmd)==0)
 
     cmd = "chmod a+r %s" % (tmpFname) # otherwise mysqld can't read the file
     assert(os.system(cmd)==0)
 
     cmd = "hgLoadSqlTab hg19 clinvarSub clinvarSub.sql %s" % (tmpFname)
     print(cmd)
     assert(os.system(cmd)==0)
 
     cmd = "hgLoadSqlTab hg38 clinvarSub clinvarSub.sql %s" % (tmpFname)
     assert(os.system(cmd)==0)
 
 def mostCurrentVersionName():
     " return name of version on FTP site "
     cmd = 'curl -s https://ftp.ncbi.nlm.nih.gov/pub/clinvar/xml/ClinVarVCVRelease_00-latest.xml.gz | zcat | head -n2 | tail -n1'