commit/galaxy-central: kanwei: Grouping tool: make error clearer when a line doesn't have entry on grouped column
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/fb6aa53bb113/ changeset: fb6aa53bb113 user: kanwei date: 2011-10-05 05:11:23 summary: Grouping tool: make error clearer when a line doesn't have entry on grouped column affected #: 1 file (-1 bytes) --- a/tools/stats/grouping.py Tue Oct 04 22:25:08 2011 -0400 +++ b/tools/stats/grouping.py Tue Oct 04 23:11:23 2011 -0400 @@ -1,7 +1,6 @@ #!/usr/bin/env python # Guruprasad Ananda -# Refactored 2011, Kanwei Li -# Refactored to use numpy instead of rpy +# Refactored 2011 to use numpy instead of rpy, Kanwei Li """ This tool provides the SQL "group by" functionality. """ @@ -83,7 +82,11 @@ fout = open(sys.argv[1], "w") def is_new_item(line): - item = line.strip().split("\t")[group_col] + try: + item = line.strip().split("\t")[group_col] + except IndexError: + stop_err( "The following line didn't have %s columns: %s" % (group_col+1, line) ) + if ignorecase == 1: return item.lower() return item Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket