geronimp / enrichM

Toolbox for comparative genomics of MAGs
81 stars 22 forks source link

enrichm classify fails on blank lines in input file #104

Closed minillinim closed 3 years ago

minillinim commented 4 years ago

Using version 0.5.0 Running enrichm classify with --genome_and_annotation_file that includes a blank line (or new line at EOF) causes:

Traceback (most recent call last):
  File "/path/to/.local/lib/python3.8/site-packages/enrichm/parser.py", line 43, in parse_genome_and_annotation_file_lf
    genome, annotation = line.strip().split("\t")
ValueError: not enough values to unpack (expected 2, got 1)

To fix add:

if line == '\n': continue

Just above where the error occurs.