Mercurial > repos > devteam > column_maker
annotate column_maker.py @ 5:c6fdc1118036 draft
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 0cb87d8f454f205af021d653d7f7d5a7c14c7718"
| author | devteam |
|---|---|
| date | Wed, 15 Jul 2020 14:38:05 +0000 |
| parents | 3335c0d583d8 |
| children | 0aeda7a81b46 |
| rev | line source |
|---|---|
| 0 | 1 #!/usr/bin/env python |
|
4
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
2 """ |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
3 This tool takes a tab-delimited textfile as input and creates another column in |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
4 the file which is the result of a computation performed on every row in the |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
5 original file. The tool will skip over invalid lines within the file, |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
6 informing the user about the number of lines skipped. |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
7 """ |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
8 from __future__ import print_function |
| 0 | 9 |
|
4
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
10 import re |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
11 import sys |
| 0 | 12 |
|
4
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
13 assert sys.version_info[:2] >= (2, 4) |
| 0 | 14 |
| 15 inp_file = sys.argv[1] | |
| 16 out_file = sys.argv[2] | |
| 17 expr = sys.argv[3] | |
| 18 round_result = sys.argv[4] | |
| 19 try: | |
|
4
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
20 in_columns = int(sys.argv[5]) |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
21 except Exception: |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
22 exit("Missing or invalid 'columns' metadata value, click the pencil icon in the history item and select the Auto-detect option to correct it. This tool can only be used with tab-delimited data.") |
| 0 | 23 if in_columns < 2: |
| 24 # To be considered tabular, data must fulfill requirements of the sniff.is_column_based() method. | |
|
4
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
25 exit("Missing or invalid 'columns' metadata value, click the pencil icon in the history item and select the Auto-detect option to correct it. This tool can only be used with tab-delimited data.") |
| 0 | 26 try: |
|
4
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
27 in_column_types = sys.argv[6].split(',') |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
28 except Exception: |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
29 exit("Missing or invalid 'column_types' metadata value, click the pencil icon in the history item and select the Auto-detect option to correct it. This tool can only be used with tab-delimited data.") |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
30 if len(in_column_types) != in_columns: |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
31 exit("The 'columns' metadata setting does not conform to the 'column_types' metadata setting, click the pencil icon in the history item and select the Auto-detect option to correct it. This tool can only be used with tab-delimited data.") |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
32 avoid_scientific_notation = sys.argv[7] |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
33 |
| 0 | 34 # Unescape if input has been escaped |
| 35 mapped_str = { | |
| 36 '__lt__': '<', | |
| 37 '__le__': '<=', | |
| 38 '__eq__': '==', | |
| 39 '__ne__': '!=', | |
| 40 '__gt__': '>', | |
| 41 '__ge__': '>=', | |
| 42 '__sq__': '\'', | |
| 43 '__dq__': '"', | |
| 44 } | |
| 45 for key, value in mapped_str.items(): | |
|
4
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
46 expr = expr.replace(key, value) |
| 0 | 47 |
| 48 operators = 'is|not|or|and' | |
|
5
c6fdc1118036
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 0cb87d8f454f205af021d653d7f7d5a7c14c7718"
devteam
parents:
4
diff
changeset
|
49 builtin_and_math_functions = 'abs|all|any|bin|chr|cmp|complex|divmod|float|bool|hex|int|len|long|max|min|oct|ord|pow|range|reversed|round|sorted|str|sum|type|unichr|unicode|log|log10|exp|sqrt|ceil|floor' |
|
4
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
50 string_and_list_methods = [name for name in dir('') + dir([]) if not name.startswith('_')] |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
51 whitelist = r"^([c0-9\+\-\*\/\(\)\.\'\"><=,:! ]|%s|%s|%s)*$" % (operators, builtin_and_math_functions, '|'.join(string_and_list_methods)) |
| 0 | 52 if not re.compile(whitelist).match(expr): |
|
4
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
53 exit("Invalid expression") |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
54 if avoid_scientific_notation == "yes": |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
55 expr = "format_float_positional(%s)" % expr |
| 0 | 56 |
| 57 # Prepare the column variable names and wrappers for column data types | |
| 58 cols, type_casts = [], [] | |
|
4
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
59 for col in range(1, in_columns + 1): |
| 0 | 60 col_name = "c%d" % col |
|
4
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
61 cols.append(col_name) |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
62 col_type = in_column_types[col - 1].strip() |
| 0 | 63 if round_result == 'no' and col_type == 'int': |
| 64 col_type = 'float' | |
|
4
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
65 type_cast = "%s(%s)" % (col_type, col_name) |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
66 type_casts.append(type_cast) |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
67 |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
68 col_str = ', '.join(cols) # 'c1, c2, c3, c4' |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
69 type_cast_str = ', '.join(type_casts) # 'str(c1), int(c2), int(c3), str(c4)' |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
70 assign = "%s = line.split('\\t')" % col_str |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
71 wrap = "%s = %s" % (col_str, type_cast_str) |
| 0 | 72 skipped_lines = 0 |
| 73 first_invalid_line = 0 | |
| 74 invalid_line = None | |
| 75 lines_kept = 0 | |
| 76 total_lines = 0 | |
|
4
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
77 out = open(out_file, 'wt') |
| 0 | 78 |
| 79 # Read input file, skipping invalid lines, and perform computation that will result in a new column | |
| 80 code = ''' | |
|
4
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
81 # import here since flake8 complains otherwise |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
82 from math import ( |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
83 ceil, |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
84 exp, |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
85 floor, |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
86 log, |
|
5
c6fdc1118036
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 0cb87d8f454f205af021d653d7f7d5a7c14c7718"
devteam
parents:
4
diff
changeset
|
87 log10, |
|
4
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
88 sqrt |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
89 ) |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
90 from numpy import format_float_positional |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
91 |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
92 fh = open(inp_file) |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
93 for i, line in enumerate(fh): |
| 0 | 94 total_lines += 1 |
|
4
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
95 line = line.rstrip('\\r\\n') |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
96 if not line or line.startswith('#'): |
| 0 | 97 skipped_lines += 1 |
| 98 if not invalid_line: | |
| 99 first_invalid_line = i + 1 | |
| 100 invalid_line = line | |
| 101 continue | |
| 102 try: | |
| 103 %s | |
| 104 %s | |
| 105 new_val = %s | |
| 106 if round_result == "yes": | |
|
4
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
107 new_val = int(round(new_val)) |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
108 new_line = line + '\\t' + str(new_val) + "\\n" |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
109 out.write(new_line) |
| 0 | 110 lines_kept += 1 |
|
4
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
111 except Exception: |
| 0 | 112 skipped_lines += 1 |
| 113 if not invalid_line: | |
| 114 first_invalid_line = i + 1 | |
| 115 invalid_line = line | |
|
4
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
116 fh.close() |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
117 ''' % (assign, wrap, expr) |
| 0 | 118 |
| 119 valid_expr = True | |
| 120 try: | |
|
4
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
121 exec(code) |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
122 except Exception as e: |
| 0 | 123 out.close() |
|
4
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
124 if str(e).startswith('invalid syntax'): |
| 0 | 125 valid_expr = False |
|
4
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
126 exit('Expression "%s" likely invalid. See tool tips, syntax and examples.' % expr) |
| 0 | 127 else: |
|
4
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
128 exit(str(e)) |
| 0 | 129 |
| 130 if valid_expr: | |
| 131 out.close() | |
| 132 valid_lines = total_lines - skipped_lines | |
|
4
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
133 print('Creating column %d with expression %s' % (in_columns + 1, expr)) |
| 0 | 134 if valid_lines > 0: |
|
4
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
135 print('kept %4.2f%% of %d lines.' % (100.0 * lines_kept / valid_lines, |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
136 total_lines)) |
| 0 | 137 else: |
|
4
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
138 print('Possible invalid expression "%s" or non-existent column referenced. See tool tips, syntax and examples.' % expr) |
| 0 | 139 if skipped_lines > 0: |
|
4
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
140 print('Skipped %d invalid lines starting at line #%d: "%s"' % |
|
3335c0d583d8
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
devteam
parents:
2
diff
changeset
|
141 (skipped_lines, first_invalid_line, invalid_line)) |
