grouping: strip newlines

fixes https://github.com/galaxyproject/galaxy/issues/8383

more generally: if grouping is done on the last column then the newline
was retained and contained in the output.
This commit is contained in:
M Bernt
2019-11-10 22:16:00 +01:00
parent 67a3950c27
commit 3a0d9325a6
+3 -1
View File
@@ -124,7 +124,9 @@ def main():
item = line.split("\t")[group_col]
except IndexError:
stop_err("The following line didn't have %s columns: %s" % (group_col + 1, line))
# in case of grouping by the last column the newline character needs to be removed
# removal of other white spaces seems also useful
item = item.strip()
if ignorecase == 1:
return item.lower()
return item