Skip to content

Commit

Permalink
Try to fix python linting
Browse files Browse the repository at this point in the history
  • Loading branch information
bebatut committed Mar 18, 2024
1 parent 825e603 commit 28ad622
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/metagene_annotator/convert_mga.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __main__():
'complete/partial', 'gene score', 'used model',
'rbs start', 'rbs end', 'rbs score']))

gc_rbs_pat = '# gc = (-?[0-9]*[.]?[0-9]+), rbs = (-?[0-9]*[.]?[0-9]+)'
gc_rbs_pat = '# gc = (-?[0-9]*[.]?[0-9]+), rbs = (-?[0-9]*[.]?[0-9]+)'
seq_count = 0
gene_count = 0
for i, line in enumerate(input_rdr):
Expand All @@ -46,12 +46,12 @@ def __main__():
try:
m = re.match(gc_rbs_pat, line.strip())
seq_gc, seq_rbs = m.groups()
except:
except Exception as ex:
seq_gc = seq_rbs = ''
elif line.startswith('# self:'):
seq_type = re.sub('# self:', '', line.rstrip())
elif line.startswith('# '):
seq_name = re.sub('# (\S+).*$', '\\1', line.rstrip())
seq_name = re.sub(r'# (\S+).*$', '\\1', line.rstrip())
seq_count += 1
else:
fields = line.split('\t')
Expand Down

0 comments on commit 28ad622

Please sign in to comment.