Mercurial > repos > jjohnson > query_tabular
annotate query_tabular.xml @ 10:e84d1c3bf4fe draft
Uploaded
author | jjohnson |
---|---|
date | Thu, 02 Mar 2017 13:43:25 -0500 |
parents | ae27dab228b8 |
children | fd16243931d6 |
rev | line source |
---|---|
6 | 1 <tool id="query_tabular" name="Query Tabular" version="2.0.0"> |
0
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
2 <description>using sqlite sql</description> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
3 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
4 <requirements> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
5 </requirements> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
6 <stdio> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
7 <exit_code range="1:" /> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
8 </stdio> |
6 | 9 <command><![CDATA[ |
8 | 10 cat $query_file && |
6 | 11 #if $add_to_database.withdb: |
12 #if $save_db: | |
8 | 13 cp "$add_to_database.withdb" "$sqlitedb" && |
6 | 14 #else: |
15 cp "$add_to_database.withdb" "$workdb" && | |
16 #end if | |
17 #end if | |
18 python $__tool_directory__/query_tabular.py | |
0
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
19 #if $save_db |
8 | 20 -s "$sqlitedb" |
0
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
21 #else |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
22 -s $workdb |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
23 #end if |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
24 -j $table_json |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
25 #if $sqlquery: |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
26 -Q "$query_file" |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
27 $no_header |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
28 -o $output |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
29 #end if |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
30 ]]></command> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
31 <configfiles> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
32 <configfile name="query_file"> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
33 $sqlquery |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
34 </configfile> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
35 <configfile name="table_json"> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
36 #import json |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
37 #set $jtbldef = dict() |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
38 #set $jtbls = [] |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
39 #set $jtbldef['tables'] = $jtbls |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
40 #for $i,$tbl in enumerate($tables): |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
41 #set $jtbl = dict() |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
42 #set $jtbl['file_path'] = str($tbl.table) |
4
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
43 #if $tbl.tbl_opts.table_name: |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
44 #set $tname = str($tbl.tbl_opts.table_name) |
0
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
45 #else |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
46 #set $tname = 't' + str($i + 1) |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
47 #end if |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
48 #set $jtbl['table_name'] = $tname |
4
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
49 ## #if $tbl.tbl_opts.sel_cols: |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
50 ## #set $jtbl['sel_cols'] = $tbl.tbl_opts.sel_cols el_cols |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
51 ## #end if |
5
19ae309ec53c
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 29288f94a382686e263623cf6ddcd235ed5f2310-dirty
jjohnson
parents:
4
diff
changeset
|
52 #if $tbl.tbl_opts.pkey_autoincr: |
19ae309ec53c
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 29288f94a382686e263623cf6ddcd235ed5f2310-dirty
jjohnson
parents:
4
diff
changeset
|
53 #set $jtbl['pkey_autoincr'] = str($tbl.tbl_opts.pkey_autoincr) |
19ae309ec53c
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 29288f94a382686e263623cf6ddcd235ed5f2310-dirty
jjohnson
parents:
4
diff
changeset
|
54 #end if |
4
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
55 #if $tbl.tbl_opts.col_names: |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
56 #set $col_names = str($tbl.tbl_opts.col_names) |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
57 #if $tbl.tbl_opts.load_named_columns: |
3
3e3b3c883bec
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 60d1a49c09f87c1c1ec6fecbe54aa226bdc695a7-dirty
jjohnson
parents:
2
diff
changeset
|
58 #set $jtbl['load_named_columns'] = True |
3e3b3c883bec
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 60d1a49c09f87c1c1ec6fecbe54aa226bdc695a7-dirty
jjohnson
parents:
2
diff
changeset
|
59 #end if |
0
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
60 #else |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
61 #set $col_names = '' |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
62 #end if |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
63 #set $jtbl['column_names'] = $col_names |
4
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
64 #set $idx_unique = [] |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
65 #set $idx_non = [] |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
66 #for $idx in $tbl.tbl_opts.indexes: |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
67 #if $idx.unique: |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
68 #silent $idx_unique.append(str($idx.index_columns)) |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
69 #else: |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
70 #silent $idx_non.append(str($idx.index_columns)) |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
71 #end if |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
72 #end for |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
73 #if len($idx_unique) > 0: |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
74 #set $jtbl['unique'] = $idx_unique |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
75 #end if |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
76 #if len($idx_non) > 0: |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
77 #set $jtbl['index'] = $idx_non |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
78 #end if |
6 | 79 #set $input_filters = [] |
80 #for $fi in $tbl.input_opts.linefilters: | |
81 #if $fi.filter.filter_type == 'skip': | |
8 | 82 #if str($fi.filter.skip_lines) != '': |
6 | 83 #set $jtbl['comment_lines'] = int($fi.filter.skip_lines) |
84 #elif $tbl.table.metadata.comment_lines and $tbl.table.metadata.comment_lines > 0: | |
85 #set $jtbl['comment_lines'] = int($tbl.table.metadata.comment_lines) | |
86 #end if | |
87 #elif $fi.filter.filter_type == 'comment': | |
88 #set $jtbl['comment_char'] = str($fi.filter.comment_char) | |
89 #elif $fi.filter.filter_type == 'regex': | |
90 #set $filter_dict = dict() | |
91 #set $filter_dict['filter'] = str($fi.filter.filter_type) | |
92 #set $filter_dict['pattern'] = str($fi.filter.regex_pattern) | |
93 #set $filter_dict['action'] = str($fi.filter.regex_action) | |
94 #silent $input_filters.append($filter_dict) | |
95 #elif $fi.filter.filter_type == 'replace': | |
96 #set $filter_dict = dict() | |
97 #set $filter_dict['filter'] = str($fi.filter.filter_type) | |
98 #set $filter_dict['column'] = int(str($fi.filter.column)) | |
99 #set $filter_dict['pattern'] = str($fi.filter.regex_pattern) | |
100 #set $filter_dict['replace'] = str($fi.filter.regex_replace) | |
101 #silent $input_filters.append($filter_dict) | |
102 ## #elif $fi.filter.filter_type == 'normalize': | |
103 ## #set $filter_dict = dict() | |
104 ## #set $filter_dict['filter'] = str($fi.filter.filter_type) | |
105 ## #set $filter_dict['columns'] = [int(str($ci)) for $ci in str($fi.filter.columns).split(',')] | |
106 ## #set $filter_dict['separator'] = str($fi.filter.separator) | |
107 ## #silent $input_filters.append($filter_dict) | |
108 #end if | |
109 #end for | |
110 #if $input_filters: | |
111 #set $jtbl['filters'] = $input_filters | |
112 #end if | |
0
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
113 #set $jtbls += [$jtbl] |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
114 #end for |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
115 #echo $json.dumps($jtbldef) |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
116 </configfile> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
117 </configfiles> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
118 <inputs> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
119 <param name="workdb" type="hidden" value="workdb.sqlite" label=""/> |
6 | 120 <section name="add_to_database" expanded="false" title="Add tables to an existing database"> |
121 <param name="withdb" type="data" format="sqlite" optional="true" label="Add tables to this Database" | |
122 help="Make sure your added table names are not already in this database"/> | |
123 </section> | |
8 | 124 <repeat name="tables" title="Database Table" min="0"> |
5
19ae309ec53c
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 29288f94a382686e263623cf6ddcd235ed5f2310-dirty
jjohnson
parents:
4
diff
changeset
|
125 <param name="table" type="data" format="tabular" label="Tabular Dataset for Table"/> |
6 | 126 <section name="input_opts" expanded="false" title="Filter Dataset Input"> |
127 <repeat name="linefilters" title="Filter Tabular Input Lines"> | |
128 <conditional name="filter"> | |
129 <param name="filter_type" type="select" label="Filter By"> | |
130 <option value="skip">skip leading lines</option> | |
131 <option value="comment">comment char</option> | |
132 <option value="regex">by regex expression matching</option> | |
133 <option value="replace">regex replace value in column</option> | |
134 <!-- | |
135 <option value="normalize">normalize list columns, replicates row for each item in list</option> | |
136 --> | |
137 </param> | |
138 <when value="skip"> | |
8 | 139 <param name="skip_lines" type="integer" value="" min="0" optional="true" label="Skip lines" |
6 | 140 help="Leave blank to use the comment lines metadata for this dataset" /> |
141 </when> | |
142 <when value="comment"> | |
143 <param name="comment_char" type="text" value="#" label="Comment line starting text"> | |
8 | 144 <sanitizer sanitize="False"/> |
6 | 145 </param> |
146 </when> | |
147 <when value="regex"> | |
148 <param name="regex_pattern" type="text" value="" label="regex pattern"> | |
149 <sanitizer sanitize="False"/> | |
150 </param> | |
151 <param name="regex_action" type="select" label="action for regex match"> | |
152 <option value="exclude_match">exclude line on pattern match</option> | |
153 <option value="include_match">include line on pattern match</option> | |
154 <option value="exclude_find">exclude line if pattern found</option> | |
155 <option value="include_find">include line if pattern found</option> | |
156 </param> | |
157 </when> | |
158 <when value="replace"> | |
159 <param name="column" type="data_column" data_ref="table" label="Column to replace text" | |
160 help=""/> | |
161 <param name="regex_pattern" type="text" value="" label="regex pattern"> | |
162 <sanitizer sanitize="False"/> | |
163 </param> | |
164 <param name="regex_replace" type="text" value="" label="replacement expression"> | |
165 <sanitizer sanitize="False"/> | |
166 </param> | |
167 </when> | |
168 <!-- | |
169 <when value="normalize"> | |
170 <param name="columns" type="data_column" data_ref="table" multiple="True" label="Columns to split" | |
171 help=""/> | |
172 <param name="separator" type="text" value="," label="List item delimiter in column"> | |
173 <sanitizer sanitize="False"/> | |
174 <validator type="regex" message="Anything but TAB or Newline">^[^\t\n\r\f\v]+$</validator> | |
175 </param> | |
176 </when> | |
177 --> | |
178 </conditional> | |
179 </repeat> | |
180 </section> | |
4
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
181 <section name="tbl_opts" expanded="false" title="Table Options"> |
5
19ae309ec53c
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 29288f94a382686e263623cf6ddcd235ed5f2310-dirty
jjohnson
parents:
4
diff
changeset
|
182 <param name="table_name" type="text" value="" optional="true" label="Specify Name for Table"> |
19ae309ec53c
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 29288f94a382686e263623cf6ddcd235ed5f2310-dirty
jjohnson
parents:
4
diff
changeset
|
183 <help>By default, tables will be named: t1,t2,...,tn (table names must be unique)</help> |
4
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
184 <validator type="regex" message="Table name should start with a letter and may contain additional letters, digits, and underscores">^[A-Za-z]\w*$</validator> |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
185 </param> |
5
19ae309ec53c
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 29288f94a382686e263623cf6ddcd235ed5f2310-dirty
jjohnson
parents:
4
diff
changeset
|
186 <param name="col_names" type="text" value="" optional="true" label="Specify Column Names"> |
19ae309ec53c
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 29288f94a382686e263623cf6ddcd235ed5f2310-dirty
jjohnson
parents:
4
diff
changeset
|
187 <help>By default, table columns will be named: c1,c2,c3,...,cn (column names for a table must be unique)</help> |
4
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
188 <sanitizer sanitize="False"/> |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
189 <validator type="regex" message="A List of names separated by commas: Column names should start with a letter and may contain additional letters, digits, and underscores. Otherwise, the name must be eclosed in: double quotes, back quotes, or square brackets.">^([A-Za-z]\w*|"\S+[^,"]*"|`\S+[^,`]*`|[[]\S+[^,"]*[]])?(,([A-Za-z]\w*|"\S+.*"|`\S+[^,`]*`|[[]\S+[^,"]*[]])?)*$</validator> |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
190 </param> |
5
19ae309ec53c
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 29288f94a382686e263623cf6ddcd235ed5f2310-dirty
jjohnson
parents:
4
diff
changeset
|
191 <param name="load_named_columns" type="boolean" truevalue="load_named_columns" falsevalue="" checked="false" label="Only load the columns you have named into database"/> |
19ae309ec53c
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 29288f94a382686e263623cf6ddcd235ed5f2310-dirty
jjohnson
parents:
4
diff
changeset
|
192 <param name="pkey_autoincr" type="text" value="" optional="true" label="Add an auto increment primary key column with this name" |
19ae309ec53c
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 29288f94a382686e263623cf6ddcd235ed5f2310-dirty
jjohnson
parents:
4
diff
changeset
|
193 help="Only creates this additional column when a name is entered. (This can not be the same name as any of the other columns in this table.)"> |
19ae309ec53c
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 29288f94a382686e263623cf6ddcd235ed5f2310-dirty
jjohnson
parents:
4
diff
changeset
|
194 <validator type="regex" message="Column name">^([A-Za-z]\w*)?$</validator> |
19ae309ec53c
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 29288f94a382686e263623cf6ddcd235ed5f2310-dirty
jjohnson
parents:
4
diff
changeset
|
195 </param> |
19ae309ec53c
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 29288f94a382686e263623cf6ddcd235ed5f2310-dirty
jjohnson
parents:
4
diff
changeset
|
196 <repeat name="indexes" title="Table Index"> |
4
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
197 <param name="unique" type="boolean" truevalue="yes" falsevalue="no" checked="False" label="This is a unique index"/> |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
198 <param name="index_columns" type="text" value="" label="Index on Columns"> |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
199 <help>Create an index on the column names: e,g, c1 or c2,c4</help> |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
200 <validator type="regex" message="Column name, separated by commes if more than one">^([A-Za-z]\w*|"\S+[^,"]*"|`\S+[^,`]*`|[[]\S+[^,"]*[]])(,([A-Za-z]\w*|"\S+.*"|`\S+[^,`]*`|[[]\S+[^,"]*[]])?)*$</validator> |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
201 </param> |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
202 </repeat> |
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
203 </section> |
0
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
204 </repeat> |
5
19ae309ec53c
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 29288f94a382686e263623cf6ddcd235ed5f2310-dirty
jjohnson
parents:
4
diff
changeset
|
205 <param name="save_db" type="boolean" truevalue="yes" falsevalue="no" checked="false" label="Save the sqlite database in your history"/> |
6 | 206 <param name="sqlquery" type="text" area="true" size="20x80" value="" optional="true" label="SQL Query to generate tabular output"> |
5
19ae309ec53c
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 29288f94a382686e263623cf6ddcd235ed5f2310-dirty
jjohnson
parents:
4
diff
changeset
|
207 <help>By default: tables are named: t1,t2,...,tn and columns in each table: c1,c2,...,cn</help> |
0
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
208 <sanitizer sanitize="False"/> |
4
9d73dca48178
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents:
3
diff
changeset
|
209 <validator type="regex" message="">^(?ims)\s*select\s+.*\s+from\s+.*$</validator> |
0
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
210 </param> |
5
19ae309ec53c
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 29288f94a382686e263623cf6ddcd235ed5f2310-dirty
jjohnson
parents:
4
diff
changeset
|
211 <param name="no_header" type="boolean" truevalue="-n" falsevalue="" checked="False" label="Omit column headers from tabular output"/> |
0
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
212 </inputs> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
213 <outputs> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
214 <data format="sqlite" name="sqlitedb" label="sqlite db of ${on_string}"> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
215 <filter>save_db or not (sqlquery and len(sqlquery) > 0)</filter> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
216 </data> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
217 <data format="tabular" name="output" label="query results on ${on_string}"> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
218 <filter>sqlquery and len(sqlquery) > 0</filter> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
219 </data> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
220 </outputs> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
221 <tests> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
222 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
223 <test> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
224 <repeat name="tables"> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
225 <param name="table" ftype="tabular" value="customers.tsv"/> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
226 <param name="table_name" value="customers"/> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
227 <param name="col_names" value="CustomerID,FirstName,LastName,Email,DOB,Phone"/> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
228 </repeat> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
229 <repeat name="tables"> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
230 <param name="table" ftype="tabular" value="sales.tsv"/> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
231 <param name="table_name" value="sales"/> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
232 <param name="col_names" value="CustomerID,Date,SaleAmount"/> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
233 </repeat> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
234 <param name="sqlquery" value="SELECT FirstName,LastName,sum(SaleAmount) as "TotalSales" FROM customers join sales on customers.CustomerID = sales.CustomerID GROUP BY customers.CustomerID ORDER BY TotalSales DESC"/> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
235 <output name="output" file="sales_results.tsv"/> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
236 </test> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
237 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
238 <test> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
239 <repeat name="tables"> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
240 <param name="table" ftype="tabular" value="customers.tsv"/> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
241 <param name="col_names" value=",FirstName,LastName,,DOB,"/> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
242 </repeat> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
243 <repeat name="tables"> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
244 <param name="table" ftype="tabular" value="sales.tsv"/> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
245 </repeat> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
246 <param name="sqlquery" value="SELECT FirstName,LastName,sum(t2.c3) as "TotalSales" FROM t1 join t2 on t1.c1 = t2.c1 GROUP BY t1.c1 ORDER BY TotalSales DESC;"/> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
247 <output name="output" file="sales_results.tsv"/> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
248 </test> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
249 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
250 <test> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
251 <repeat name="tables"> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
252 <param name="table" ftype="tabular" value="customers.tsv"/> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
253 <param name="col_names" value=",FirstName,LastName,,BirthDate,"/> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
254 </repeat> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
255 <param name="sqlquery" value="select FirstName,LastName,re_sub('^\d{2}(\d{2})-(\d\d)-(\d\d)','\3/\2/\1',BirthDate) as "DOB" from t1 WHERE re_search('[hp]er',c4)"/> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
256 <output name="output" file="regex_results.tsv"/> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
257 </test> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
258 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
259 <test> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
260 <repeat name="tables"> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
261 <param name="table" ftype="tabular" value="IEDB.tsv"/> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
262 <param name="table_name" value="iedb"/> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
263 <param name="col_names" value="ID,allele,seq_num,start,end,length,peptide,method,percentile_rank,ann_ic50,ann_rank,smm_ic50,smm_rank,comblib_sidney2008_score,comblib_sidney2008_rank,netmhcpan_ic50,netmhcpan_rank"/> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
264 </repeat> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
265 <repeat name="tables"> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
266 <param name="table" ftype="tabular" value="netMHC_summary.tsv"/> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
267 <param name="table_name" value="mhc_summary"/> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
268 <param name="col_names" value="pos,peptide,logscore,affinity,Bind_Level,Protein,Allele"/> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
269 </repeat> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
270 <param name="sqlquery" value="select iedb.ID,iedb.peptide,iedb.start,iedb.end,iedb.percentile_rank,mhc_summary.logscore,mhc_summary.affinity,mhc_summary.Bind_Level from iedb left outer join mhc_summary on iedb.peptide = mhc_summary.peptide order by affinity,Bind_Level"/> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
271 <output name="output" file="query_results.tsv"/> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
272 </test> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
273 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
274 </tests> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
275 <help><![CDATA[ |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
276 ============= |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
277 Query Tabular |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
278 ============= |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
279 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
280 **Inputs** |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
281 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
282 Loads tabular datasets into a SQLite_ data base. |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
283 |
6 | 284 An existing SQLite_ data base can be used as input, and any selected tabular datasets will be added as new tables in that data base. |
285 | |
286 | |
0
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
287 **Outputs** |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
288 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
289 The results of a SQL query are output to the history as a tabular file. |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
290 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
291 The SQLite_ data base can also be saved and output as a dataset in the history. |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
292 |
5
19ae309ec53c
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 29288f94a382686e263623cf6ddcd235ed5f2310-dirty
jjohnson
parents:
4
diff
changeset
|
293 *(The* **SQLite to tabular** *tool can run additional queries on this database.)* |
19ae309ec53c
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 29288f94a382686e263623cf6ddcd235ed5f2310-dirty
jjohnson
parents:
4
diff
changeset
|
294 |
19ae309ec53c
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 29288f94a382686e263623cf6ddcd235ed5f2310-dirty
jjohnson
parents:
4
diff
changeset
|
295 |
0
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
296 For help in using SQLite_ see: http://www.sqlite.org/docs.html |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
297 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
298 **NOTE:** input for SQLite dates input field must be in the format: *YYYY-MM-DD* for example: 2015-09-30 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
299 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
300 See: http://www.sqlite.org/lang_datefunc.html |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
301 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
302 **Example** |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
303 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
304 Given 2 tabular datasets: *customers* and *sales* |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
305 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
306 Dataset *customers* |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
307 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
308 Table name: "customers" |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
309 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
310 Column names: "CustomerID,FirstName,LastName,Email,DOB,Phone" |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
311 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
312 =========== ========== ========== ===================== ========== ============ |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
313 #CustomerID FirstName LastName Email DOB Phone |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
314 =========== ========== ========== ===================== ========== ============ |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
315 1 John Smith John.Smith@yahoo.com 1968-02-04 626 222-2222 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
316 2 Steven Goldfish goldfish@fishhere.net 1974-04-04 323 455-4545 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
317 3 Paula Brown pb@herowndomain.org 1978-05-24 416 323-3232 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
318 4 James Smith jim@supergig.co.uk 1980-10-20 416 323-8888 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
319 =========== ========== ========== ===================== ========== ============ |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
320 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
321 Dataset *sales* |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
322 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
323 Table name: "sales" |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
324 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
325 Column names: "CustomerID,Date,SaleAmount" |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
326 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
327 ============= ============ ============ |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
328 #CustomerID Date SaleAmount |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
329 ============= ============ ============ |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
330 2 2004-05-06 100.22 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
331 1 2004-05-07 99.95 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
332 3 2004-05-07 122.95 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
333 3 2004-05-13 100.00 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
334 4 2004-05-22 555.55 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
335 ============= ============ ============ |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
336 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
337 The query |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
338 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
339 :: |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
340 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
341 SELECT FirstName,LastName,sum(SaleAmount) as "TotalSales" |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
342 FROM customers join sales on customers.CustomerID = sales.CustomerID |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
343 GROUP BY customers.CustomerID ORDER BY TotalSales DESC; |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
344 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
345 Produces this tabular output: |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
346 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
347 ========== ======== ========== |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
348 #FirstName LastName TotalSales |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
349 ========== ======== ========== |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
350 James Smith 555.55 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
351 Paula Brown 222.95 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
352 Steven Goldfish 100.22 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
353 John Smith 99.95 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
354 ========== ======== ========== |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
355 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
356 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
357 If the optional Table name and Column names inputs are not used, the query would be: |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
358 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
359 :: |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
360 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
361 SELECT t1.c2 as "FirstName", t1.c3 as "LastName", sum(t2.c3) as "TotalSales" |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
362 FROM t1 join t2 on t1.c1 = t2.c1 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
363 GROUP BY t1.c1 ORDER BY TotalSales DESC; |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
364 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
365 You can selectively name columns, e.g. on the customers input you could just name columns 2,3, and 5: |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
366 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
367 Column names: ,FirstName,LastName,,BirthDate |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
368 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
369 Results in the following data base table |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
370 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
371 =========== ========== ========== ===================== ========== ============ |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
372 #c1 FirstName LastName c4 BirthDate c6 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
373 =========== ========== ========== ===================== ========== ============ |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
374 1 John Smith John.Smith@yahoo.com 1968-02-04 626 222-2222 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
375 2 Steven Goldfish goldfish@fishhere.net 1974-04-04 323 455-4545 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
376 3 Paula Brown pb@herowndomain.org 1978-05-24 416 323-3232 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
377 4 James Smith jim@supergig.co.uk 1980-10-20 416 323-8888 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
378 =========== ========== ========== ===================== ========== ============ |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
379 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
380 Regular_expression_ functions are included for: |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
381 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
382 :: |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
383 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
384 matching: re_match('pattern',column) |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
385 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
386 SELECT t1.FirstName, t1.LastName |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
387 FROM t1 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
388 WHERE re_match('^.*\.(net|org)$',c4) |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
389 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
390 Results: |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
391 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
392 =========== ========== |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
393 #FirstName LastName |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
394 =========== ========== |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
395 Steven Goldfish |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
396 Paula Brown |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
397 =========== ========== |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
398 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
399 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
400 :: |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
401 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
402 searching: re_search('pattern',column) |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
403 substituting: re_sub('pattern','replacement,column) |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
404 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
405 SELECT t1.FirstName, t1.LastName, re_sub('^\d{2}(\d{2})-(\d\d)-(\d\d)','\3/\2/\1',BirthDate) as "DOB" |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
406 FROM t1 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
407 WHERE re_search('[hp]er',c4) |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
408 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
409 Results: |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
410 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
411 =========== ========== ========== |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
412 #FirstName LastName DOB |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
413 =========== ========== ========== |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
414 Steven Goldfish 04/04/74 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
415 Paula Brown 24/05/78 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
416 James Smith 20/10/80 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
417 =========== ========== ========== |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
418 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
419 .. _Regular_expression: https://docs.python.org/release/2.7/library/re.html |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
420 .. _SQLite: http://www.sqlite.org/index.html |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
421 |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
422 ]]></help> |
926c62f7fa09
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff
changeset
|
423 </tool> |