Skip to content

Commit

Permalink
Update sequence.py
Browse files Browse the repository at this point in the history
Line after header must not be empty or start with '>'
  • Loading branch information
jj-umn committed Nov 8, 2018
1 parent 4c71bb4 commit f21a3dd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/galaxy/datatypes/sequence.py
Expand Up @@ -594,11 +594,10 @@ def sniff_prefix(self, file_prefix):
break
elif line and not line.startswith('#'): # first non-empty non-comment line
if line.startswith('>'):
# The next line.strip() must not be '', nor startwith '>'
line = fh.readline().strip()
if line == '' or line.startswith('>'):
break
elif len(line) > 1 and not re.search(r'^[\d.]+$', line[1:]):
return False
return True
else:
break # we found a non-empty line, but it's not a header
Expand Down

0 comments on commit f21a3dd

Please sign in to comment.