Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
handles empty lines in input files (order_color)
  • Loading branch information
proost committed Jan 25, 2018
1 parent 717a356 commit b5290c7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions conekt/models/expression/profiles.py
Expand Up @@ -237,9 +237,12 @@ def add_profile_from_lstrap(matrix_file, annotation_file, species_id, order_colo
if order_color_file is not None:
with open(order_color_file, 'r') as fin:
for line in fin:
o, c = line.strip().split('\t')
order.append(o)
colors.append(c)
try:
o, c = line.strip().split('\t')
order.append(o)
colors.append(c)
except Exception as _:
pass

# build conversion table for sequences
sequences = Sequence.query.filter_by(species_id=species_id).all()
Expand Down

0 comments on commit b5290c7

Please sign in to comment.