diff --git a/lib/galaxy/datatypes/converters/fasta_to_tabular_converter.py b/lib/galaxy/datatypes/converters/fasta_to_tabular_converter.py index 5a54570f060..53d683ead57 100644 --- a/lib/galaxy/datatypes/converters/fasta_to_tabular_converter.py +++ b/lib/galaxy/datatypes/converters/fasta_to_tabular_converter.py @@ -27,7 +27,7 @@ def __main__(): else: if line: sequence += line - if line.split()[0].isdigit(): + if line.split() and line.split()[0].isdigit(): sequence += ' ' if sequence: seq_hash[( sequence_count, title )] = sequence diff --git a/tools/fasta_tools/fasta_compute_length.py b/tools/fasta_tools/fasta_compute_length.py index 8714659bd85..3893072844b 100644 --- a/tools/fasta_tools/fasta_compute_length.py +++ b/tools/fasta_tools/fasta_compute_length.py @@ -34,7 +34,7 @@ def __main__(): tmp_seq = '' else: tmp_seq = "%s%s" % ( tmp_seq, line ) - if line.split()[0].isdigit(): + if line.split() and line.split()[0].isdigit(): tmp_seq = "%s " % tmp_seq if len( tmp_seq ) > 0: seq_hash[ ( tmp_seq_count, tmp_title ) ] = tmp_seq diff --git a/tools/fasta_tools/fasta_to_tabular.py b/tools/fasta_tools/fasta_to_tabular.py index 6aa433cd499..42e79e63e2a 100644 --- a/tools/fasta_tools/fasta_to_tabular.py +++ b/tools/fasta_tools/fasta_to_tabular.py @@ -35,7 +35,7 @@ def __main__(): sequence = '' else: sequence = "%s%s" % ( sequence, line ) - if line.split()[0].isdigit(): + if line.split() and line.split()[0].isdigit(): sequence += ' ' if sequence: seq_hash[( sequence_count, title )] = sequence