Mercurial > repos > jjohnson > query_tabular
comparison query_tabular.xml @ 8:ae27dab228b8 draft
Uploaded
author | jjohnson |
---|---|
date | Tue, 21 Feb 2017 12:59:26 -0500 |
parents | 03842a4f71c6 |
children | fd16243931d6 |
comparison
equal
deleted
inserted
replaced
7:72c32037fa1e | 8:ae27dab228b8 |
---|---|
5 </requirements> | 5 </requirements> |
6 <stdio> | 6 <stdio> |
7 <exit_code range="1:" /> | 7 <exit_code range="1:" /> |
8 </stdio> | 8 </stdio> |
9 <command><![CDATA[ | 9 <command><![CDATA[ |
10 cat $query_file && | |
10 #if $add_to_database.withdb: | 11 #if $add_to_database.withdb: |
11 #if $save_db: | 12 #if $save_db: |
12 cp "$add_to_database.withdb" "$save_db" && | 13 cp "$add_to_database.withdb" "$sqlitedb" && |
13 #else: | 14 #else: |
14 cp "$add_to_database.withdb" "$workdb" && | 15 cp "$add_to_database.withdb" "$workdb" && |
15 #end if | 16 #end if |
16 #end if | 17 #end if |
17 python $__tool_directory__/query_tabular.py | 18 python $__tool_directory__/query_tabular.py |
18 #if $save_db | 19 #if $save_db |
19 -s $sqlitedb | 20 -s "$sqlitedb" |
20 #else | 21 #else |
21 -s $workdb | 22 -s $workdb |
22 #end if | 23 #end if |
23 -j $table_json | 24 -j $table_json |
24 #if $sqlquery: | 25 #if $sqlquery: |
25 -Q "$query_file" | 26 -Q "$query_file" |
26 $no_header | 27 $no_header |
27 -o $output | 28 -o $output |
28 #end if | 29 #end if |
29 && cat $query_file | |
30 && cat $table_json | |
31 ]]></command> | 30 ]]></command> |
32 <configfiles> | 31 <configfiles> |
33 <configfile name="query_file"> | 32 <configfile name="query_file"> |
34 $sqlquery | 33 $sqlquery |
35 </configfile> | 34 </configfile> |
78 #set $jtbl['index'] = $idx_non | 77 #set $jtbl['index'] = $idx_non |
79 #end if | 78 #end if |
80 #set $input_filters = [] | 79 #set $input_filters = [] |
81 #for $fi in $tbl.input_opts.linefilters: | 80 #for $fi in $tbl.input_opts.linefilters: |
82 #if $fi.filter.filter_type == 'skip': | 81 #if $fi.filter.filter_type == 'skip': |
83 #if str($tbl.tbl_opts.skip_lines) != '': | 82 #if str($fi.filter.skip_lines) != '': |
84 #set $jtbl['comment_lines'] = int($fi.filter.skip_lines) | 83 #set $jtbl['comment_lines'] = int($fi.filter.skip_lines) |
85 #elif $tbl.table.metadata.comment_lines and $tbl.table.metadata.comment_lines > 0: | 84 #elif $tbl.table.metadata.comment_lines and $tbl.table.metadata.comment_lines > 0: |
86 #set $jtbl['comment_lines'] = int($tbl.table.metadata.comment_lines) | 85 #set $jtbl['comment_lines'] = int($tbl.table.metadata.comment_lines) |
87 #end if | 86 #end if |
88 #elif $fi.filter.filter_type == 'comment': | 87 #elif $fi.filter.filter_type == 'comment': |
120 <param name="workdb" type="hidden" value="workdb.sqlite" label=""/> | 119 <param name="workdb" type="hidden" value="workdb.sqlite" label=""/> |
121 <section name="add_to_database" expanded="false" title="Add tables to an existing database"> | 120 <section name="add_to_database" expanded="false" title="Add tables to an existing database"> |
122 <param name="withdb" type="data" format="sqlite" optional="true" label="Add tables to this Database" | 121 <param name="withdb" type="data" format="sqlite" optional="true" label="Add tables to this Database" |
123 help="Make sure your added table names are not already in this database"/> | 122 help="Make sure your added table names are not already in this database"/> |
124 </section> | 123 </section> |
125 <repeat name="tables" title="Database Table" min="1"> | 124 <repeat name="tables" title="Database Table" min="0"> |
126 <param name="table" type="data" format="tabular" label="Tabular Dataset for Table"/> | 125 <param name="table" type="data" format="tabular" label="Tabular Dataset for Table"/> |
127 <section name="input_opts" expanded="false" title="Filter Dataset Input"> | 126 <section name="input_opts" expanded="false" title="Filter Dataset Input"> |
128 <repeat name="linefilters" title="Filter Tabular Input Lines"> | 127 <repeat name="linefilters" title="Filter Tabular Input Lines"> |
129 <conditional name="filter"> | 128 <conditional name="filter"> |
130 <param name="filter_type" type="select" label="Filter By"> | 129 <param name="filter_type" type="select" label="Filter By"> |
135 <!-- | 134 <!-- |
136 <option value="normalize">normalize list columns, replicates row for each item in list</option> | 135 <option value="normalize">normalize list columns, replicates row for each item in list</option> |
137 --> | 136 --> |
138 </param> | 137 </param> |
139 <when value="skip"> | 138 <when value="skip"> |
140 <param name="skip_lines" type="integer" value="" min="0" label="Skip lines" | 139 <param name="skip_lines" type="integer" value="" min="0" optional="true" label="Skip lines" |
141 help="Leave blank to use the comment lines metadata for this dataset" /> | 140 help="Leave blank to use the comment lines metadata for this dataset" /> |
142 </when> | 141 </when> |
143 <when value="comment"> | 142 <when value="comment"> |
144 <param name="comment_char" type="text" value="#" label="Comment line starting text"> | 143 <param name="comment_char" type="text" value="#" label="Comment line starting text"> |
144 <sanitizer sanitize="False"/> | |
145 </param> | 145 </param> |
146 </when> | 146 </when> |
147 <when value="regex"> | 147 <when value="regex"> |
148 <param name="regex_pattern" type="text" value="" label="regex pattern"> | 148 <param name="regex_pattern" type="text" value="" label="regex pattern"> |
149 <sanitizer sanitize="False"/> | 149 <sanitizer sanitize="False"/> |