Mercurial > repos > iuc > filter_tabular
comparison filter_tabular.py @ 13:4d5aae46f850 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/query_tabular commit 35576d64a12fa664d72559172c5960c09da2b632"
author | iuc |
---|---|
date | Thu, 19 Aug 2021 19:39:58 +0000 |
parents | 6fbd9d25ceef |
children |
comparison
equal
deleted
inserted
replaced
12:37cde8134c6a | 13:4d5aae46f850 |
---|---|
17 help='Input file for filtering') | 17 help='Input file for filtering') |
18 parser.add_option('-j', '--jsonfile', dest='jsonfile', default=None, | 18 parser.add_option('-j', '--jsonfile', dest='jsonfile', default=None, |
19 help='JSON array of filter specifications') | 19 help='JSON array of filter specifications') |
20 parser.add_option('-o', '--output', dest='output', default=None, | 20 parser.add_option('-o', '--output', dest='output', default=None, |
21 help='Output file for query results') | 21 help='Output file for query results') |
22 parser.add_option('-c', '--comment_char)', dest='comment_char', default=None, | |
23 help='Line comment character') | |
22 parser.add_option('-v', '--verbose', dest='verbose', default=False, | 24 parser.add_option('-v', '--verbose', dest='verbose', default=False, |
23 action='store_true', | 25 action='store_true', |
24 help='verbose') | 26 help='verbose') |
25 (options, args) = parser.parse_args() | 27 (options, args) = parser.parse_args() |
26 | 28 |
57 ['%s: %s' % (k, f[k]) | 59 ['%s: %s' % (k, f[k]) |
58 for k in set(f.keys()) - set(['filter'])])), | 60 for k in set(f.keys()) - set(['filter'])])), |
59 file=sys.stdout) | 61 file=sys.stdout) |
60 | 62 |
61 try: | 63 try: |
62 filter_file(inputFile, outputFile, filters=filters) | 64 filter_file(inputFile, outputFile, comment_char=options.comment_char, filters=filters) |
63 except Exception as e: | 65 except Exception as e: |
64 exit('Error: %s' % (e)) | 66 exit('Error: %s' % (e)) |
65 | 67 |
66 | 68 |
67 if __name__ == "__main__": | 69 if __name__ == "__main__": |