diff --git a/lib/galaxy/datatypes/sequence.py b/lib/galaxy/datatypes/sequence.py index 9c84fc487e64..4b580530ade5 100644 --- a/lib/galaxy/datatypes/sequence.py +++ b/lib/galaxy/datatypes/sequence.py @@ -357,7 +357,9 @@ def set_meta(self, dataset: DatasetProtocol, overwrite: bool = True, **kwd) -> N sequences = 0 with compression_utils.get_fileobj(dataset.get_file_name()) as fh: for line in fh: - if line.startswith(">"): + if not line: + continue + elif line[0] == ">": sequences += 1 data_lines += 1 else: