Skip to content

Commit

Permalink
Adjust sniff function
Browse files Browse the repository at this point in the history
  • Loading branch information
leobiscassi committed Jun 3, 2016
1 parent e428a80 commit 6abcbb8
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions lib/galaxy/datatypes/molecules.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,23 +514,21 @@ def sniff(self, filename):
False
"""
headers = get_headers(filename, sep=' ', count=300)
h = t = c = s = k = e = False
h = t = c = s = k = False
for line in headers:
section_name = line[0].strip()
if section_name == 'COMPND':
if section_name == 'REMARK':
h = True
elif section_name == 'REMARK':
t = True
elif section_name == 'ROOT':
c = True
t = True
elif section_name == 'ENDROOT':
s = True
c = True
elif section_name == 'BRANCH':
k = True
s = True
elif section_name == 'TORSDOF':
e = True
k = True

if h * t * c * s * k * e:
if h * t * c * s * k:
return True
else:
return False
Expand Down

0 comments on commit 6abcbb8

Please sign in to comment.