a0b5986572f9489fe81f8339013cef773dff7ae0 wong Fri Jan 13 17:08:35 2012 -0800 doesn't skip empty lines now diff --git python/lib/ucscgenomics/ucscUtils.py python/lib/ucscgenomics/ucscUtils.py index b155e04..faa5cfb 100644 --- python/lib/ucscgenomics/ucscUtils.py +++ python/lib/ucscgenomics/ucscUtils.py @@ -112,25 +112,26 @@ consensus.append(align1[i]) consensus.append(align2[i]) before = list() if before_i != 0: before.extend(list1[0:before_i]) if before_j != 0: before.extend(list2[0:before_j]) if after_i < len(list1): consensus.extend(list1[after_i:]) if after_j < len(list2): consensus.extend(list2[after_j:]) before.extend(consensus) setcon = list() p = re.compile('^#') + p2 = re.compile('^\s*$') for i in before: - if p.match(i): + if p.match(i) or p2.match(i): setcon.append(i) continue if i in setcon: continue else: setcon.append(i) return setcon