dcd6e8bb1a69f2b49621fe94cd8b521be001dcc0 wong Thu Feb 9 16:12:56 2012 -0800 made it 0 or more spaces before labels diff --git python/lib/ucscgenomics/qa.py python/lib/ucscgenomics/qa.py index 4ec96af..2f95063 100644 --- python/lib/ucscgenomics/qa.py +++ python/lib/ucscgenomics/qa.py @@ -188,33 +188,33 @@ for i in bad: output.append(i) output.append("") else: output.append("No malformed table names") output.append("") return (output, bad) def checkLabels(trackDb): """ Check if long and short labels are too long.""" f = open(trackDb, "r") lines = f.readlines() seenlabel = dict() output = [] toolong = list() - p1 = re.compile('^\s+longLabel\s+(.*)$') - p2 = re.compile('^\s+shortLabel\s+(.*)$') - p3 = re.compile('^\s+#.*$') + p1 = re.compile('^\s*longLabel\s+(.*)$') + p2 = re.compile('^\s*shortLabel\s+(.*)$') + p3 = re.compile('^\s*#.*$') for i in lines: m1 = p1.match(i) m2 = p2.match(i) m3 = p3.match(i) if m3: continue if m1: if seenlabel.has_key(m1.group(1)): seenlabel[m1.group(1)] = seenlabel[m1.group(1)] + 1 else: seenlabel[m1.group(1)] = 1 if re.search('autogenerated', m1.group(1)): toolong.append([m1.group(1), -1]) output.append("longLabel '%s' is still autogenerated, please tell the wrangler to fix this" % m1.group(1)) if len(m1.group(1)) > 80: