comparison query_tabular.xml @ 10:98bd1e29d669 draft default tip

planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 29288f94a382686e263623cf6ddcd235ed5f2310-dirty
author jjohnson
date Wed, 20 Apr 2016 15:44:33 -0400
parents b7f149b4792f
children
comparison
equal deleted inserted replaced
9:b7f149b4792f 10:98bd1e29d669
1 <tool id="query_tabular" name="Query Tabular" version="0.1.2"> 1 <tool id="query_tabular" name="Query Tabular" version="0.1.3">
2 <description>using sqlite sql</description> 2 <description>using sqlite sql</description>
3 3
4 <requirements> 4 <requirements>
5 </requirements> 5 </requirements>
6 <stdio> 6 <stdio>
39 #end if 39 #end if
40 #set $jtbl['table_name'] = $tname 40 #set $jtbl['table_name'] = $tname
41 ## #if $tbl.tbl_opts.sel_cols: 41 ## #if $tbl.tbl_opts.sel_cols:
42 ## #set $jtbl['sel_cols'] = $tbl.tbl_opts.sel_cols el_cols 42 ## #set $jtbl['sel_cols'] = $tbl.tbl_opts.sel_cols el_cols
43 ## #end if 43 ## #end if
44 #if $tbl.tbl_opts.pkey_autoincr:
45 #set $jtbl['pkey_autoincr'] = str($tbl.tbl_opts.pkey_autoincr)
46 #end if
44 #if $tbl.tbl_opts.col_names: 47 #if $tbl.tbl_opts.col_names:
45 #set $col_names = str($tbl.tbl_opts.col_names) 48 #set $col_names = str($tbl.tbl_opts.col_names)
46 #if $tbl.tbl_opts.load_named_columns: 49 #if $tbl.tbl_opts.load_named_columns:
47 #set $jtbl['load_named_columns'] = True 50 #set $jtbl['load_named_columns'] = True
48 #end if 51 #end if
75 #echo $json.dumps($jtbldef) 78 #echo $json.dumps($jtbldef)
76 </configfile> 79 </configfile>
77 </configfiles> 80 </configfiles>
78 <inputs> 81 <inputs>
79 <param name="workdb" type="hidden" value="workdb.sqlite" label=""/> 82 <param name="workdb" type="hidden" value="workdb.sqlite" label=""/>
80 <repeat name="tables" title="Add tables" min="1"> 83 <repeat name="tables" title="Database Table" min="1">
81 <param name="table" type="data" format="tabular" label="Dataset"/> 84 <param name="table" type="data" format="tabular" label="Tabular Dataset for Table"/>
82 <section name="tbl_opts" expanded="false" title="Table Options"> 85 <section name="tbl_opts" expanded="false" title="Table Options">
83 <param name="table_name" type="text" value="" optional="true" label="Table name"> 86 <param name="table_name" type="text" value="" optional="true" label="Specify Name for Table">
84 <help>By default, tables will be named: t1,t2,...,tn</help> 87 <help>By default, tables will be named: t1,t2,...,tn (table names must be unique)</help>
85 <validator type="regex" message="Table name should start with a letter and may contain additional letters, digits, and underscores">^[A-Za-z]\w*$</validator> 88 <validator type="regex" message="Table name should start with a letter and may contain additional letters, digits, and underscores">^[A-Za-z]\w*$</validator>
86 </param> 89 </param>
87 <param name="col_names" type="text" value="" optional="true" label="Column names"> 90 <param name="col_names" type="text" value="" optional="true" label="Specify Column Names">
88 <help>By default, table columns will be named: c1,c2,c3,...,cn</help> 91 <help>By default, table columns will be named: c1,c2,c3,...,cn (column names for a table must be unique)</help>
89 <sanitizer sanitize="False"/> 92 <sanitizer sanitize="False"/>
90 <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> 93 <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>
91 </param> 94 </param>
92 <param name="load_named_columns" type="boolean" truevalue="load_named_columns" falsevalue="" checked="false" label="Only load named columns into database"/> 95 <param name="load_named_columns" type="boolean" truevalue="load_named_columns" falsevalue="" checked="false" label="Only load the columns you have named into database"/>
93 <param name="skip_lines" type="integer" value="" min="0" optional="true" label="Skip lines" help="Leave blank to use the datatype comment lines metadata" /> 96 <param name="pkey_autoincr" type="text" value="" optional="true" label="Add an auto increment primary key column with this name"
94 <repeat name="indexes"> 97 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.)">
98 <validator type="regex" message="Column name">^([A-Za-z]\w*)?$</validator>
99 </param>
100 <param name="skip_lines" type="integer" value="" min="0" optional="true" label="Skip lines" help="Leave blank to use the comment lines metadata for this dataset" />
101 <repeat name="indexes" title="Table Index">
95 <param name="unique" type="boolean" truevalue="yes" falsevalue="no" checked="False" label="This is a unique index"/> 102 <param name="unique" type="boolean" truevalue="yes" falsevalue="no" checked="False" label="This is a unique index"/>
96 <param name="index_columns" type="text" value="" label="Index on Columns"> 103 <param name="index_columns" type="text" value="" label="Index on Columns">
97 <help>Create an index on the column names: e,g, c1 or c2,c4</help> 104 <help>Create an index on the column names: e,g, c1 or c2,c4</help>
98 <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> 105 <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>
99 </param> 106 </param>
100 </repeat> 107 </repeat>
101 </section> 108 </section>
102 </repeat> 109 </repeat>
103 <param name="sqlquery" type="text" area="true" size="10x80" value="" optional="true" label="SQL Query"> 110 <param name="save_db" type="boolean" truevalue="yes" falsevalue="no" checked="false" label="Save the sqlite database in your history"/>
104 <help>By default, tables will be named: t1,t2,...,tn</help> 111 <param name="sqlquery" type="text" area="true" size="10x80" value="" optional="true" label="SQL Query to generate tabular output">
112 <help>By default: tables are named: t1,t2,...,tn and columns in each table: c1,c2,...,cn</help>
105 <sanitizer sanitize="False"/> 113 <sanitizer sanitize="False"/>
106 <validator type="regex" message="">^(?ims)\s*select\s+.*\s+from\s+.*$</validator> 114 <validator type="regex" message="">^(?ims)\s*select\s+.*\s+from\s+.*$</validator>
107 </param> 115 </param>
108 <param name="no_header" type="boolean" truevalue="-n" falsevalue="" checked="False" label="Omit column headers"/> 116 <param name="no_header" type="boolean" truevalue="-n" falsevalue="" checked="False" label="Omit column headers from tabular output"/>
109
110 <param name="save_db" type="boolean" truevalue="yes" falsevalue="no" checked="false" label="Save the sqlite database"/>
111 </inputs> 117 </inputs>
112 <outputs> 118 <outputs>
113 <data format="sqlite" name="sqlitedb" label="sqlite db of ${on_string}"> 119 <data format="sqlite" name="sqlitedb" label="sqlite db of ${on_string}">
114 <filter>save_db or not (sqlquery and len(sqlquery) > 0)</filter> 120 <filter>save_db or not (sqlquery and len(sqlquery) > 0)</filter>
115 </data> 121 </data>
184 190
185 The results of a SQL query are output to the history as a tabular file. 191 The results of a SQL query are output to the history as a tabular file.
186 192
187 The SQLite_ data base can also be saved and output as a dataset in the history. 193 The SQLite_ data base can also be saved and output as a dataset in the history.
188 194
195 *(The* **SQLite to tabular** *tool can run additional queries on this database.)*
196
197
189 198
190 For help in using SQLite_ see: http://www.sqlite.org/docs.html 199 For help in using SQLite_ see: http://www.sqlite.org/docs.html
191 200
192 **NOTE:** input for SQLite dates input field must be in the format: *YYYY-MM-DD* for example: 2015-09-30 201 **NOTE:** input for SQLite dates input field must be in the format: *YYYY-MM-DD* for example: 2015-09-30
193 202