Mercurial > repos > iuc > query_tabular
comparison query_tabular.xml @ 1:53c9f76c0788 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/query_tabular commit 81f69ad5f39223059c40501e55ac777d3feca845
| author | iuc |
|---|---|
| date | Fri, 18 Aug 2017 16:47:00 -0400 |
| parents | 81ad914a0b08 |
| children | 7be49fd649f7 |
comparison
equal
deleted
inserted
replaced
| 0:81ad914a0b08 | 1:53c9f76c0788 |
|---|---|
| 1 <tool id="query_tabular" name="Query Tabular" version="1.0.0"> | 1 <tool id="query_tabular" name="Query Tabular" version="2.0.0"> |
| 2 <description>using sqlite sql</description> | 2 <description>using sqlite sql</description> |
| 3 | 3 |
| 4 <macros> | 4 <macros> |
| 5 <import>macros.xml</import> | 5 <import>macros.xml</import> |
| 6 </macros> | 6 </macros> |
| 24 -s '$workdb' | 24 -s '$workdb' |
| 25 #end if | 25 #end if |
| 26 -j '$table_json' | 26 -j '$table_json' |
| 27 #if $sqlquery: | 27 #if $sqlquery: |
| 28 -Q '$query_file' | 28 -Q '$query_file' |
| 29 $no_header | 29 @RESULT_HEADER@ |
| 30 -o '$output' | 30 -o '$output' |
| 31 #end if | 31 #end if |
| 32 ]]></command> | 32 ]]></command> |
| 33 <configfiles> | 33 <configfiles> |
| 34 <configfile name="query_file"> | 34 <configfile name="query_file"> |
| 51 ## #if $tbl.tbl_opts.sel_cols: | 51 ## #if $tbl.tbl_opts.sel_cols: |
| 52 ## #set $jtbl['sel_cols'] = $tbl.tbl_opts.sel_cols el_cols | 52 ## #set $jtbl['sel_cols'] = $tbl.tbl_opts.sel_cols el_cols |
| 53 ## #end if | 53 ## #end if |
| 54 #if $tbl.tbl_opts.pkey_autoincr: | 54 #if $tbl.tbl_opts.pkey_autoincr: |
| 55 #set $jtbl['pkey_autoincr'] = str($tbl.tbl_opts.pkey_autoincr) | 55 #set $jtbl['pkey_autoincr'] = str($tbl.tbl_opts.pkey_autoincr) |
| 56 #end if | |
| 57 #if $tbl.tbl_opts.column_names_from_first_line: | |
| 58 #set $jtbl['firstlinenames'] = True | |
| 56 #end if | 59 #end if |
| 57 #if $tbl.tbl_opts.col_names: | 60 #if $tbl.tbl_opts.col_names: |
| 58 #set $col_names = str($tbl.tbl_opts.col_names) | 61 #set $col_names = str($tbl.tbl_opts.col_names) |
| 59 #if $tbl.tbl_opts.load_named_columns: | 62 #if $tbl.tbl_opts.load_named_columns: |
| 60 #set $jtbl['load_named_columns'] = True | 63 #set $jtbl['load_named_columns'] = True |
| 102 <section name="tbl_opts" expanded="false" title="Table Options"> | 105 <section name="tbl_opts" expanded="false" title="Table Options"> |
| 103 <param name="table_name" type="text" value="" optional="true" label="Specify Name for Table"> | 106 <param name="table_name" type="text" value="" optional="true" label="Specify Name for Table"> |
| 104 <help>By default, tables will be named: t1,t2,...,tn (table names must be unique)</help> | 107 <help>By default, tables will be named: t1,t2,...,tn (table names must be unique)</help> |
| 105 <validator type="regex" message="Table name should start with a letter and may contain additional letters, digits, and underscores">^[A-Za-z]\w*$</validator> | 108 <validator type="regex" message="Table name should start with a letter and may contain additional letters, digits, and underscores">^[A-Za-z]\w*$</validator> |
| 106 </param> | 109 </param> |
| 110 <param name="column_names_from_first_line" type="boolean" truevalue="True" falsevalue="False" checked="false" | |
| 111 label="Use first line as column names" | |
| 112 help="The names will be quoted if they are not valid SQLite column names."/> | |
| 107 <param name="col_names" type="text" value="" optional="true" label="Specify Column Names (comma-separated list)"> | 113 <param name="col_names" type="text" value="" optional="true" label="Specify Column Names (comma-separated list)"> |
| 108 <help>By default, table columns will be named: c1,c2,c3,...,cn (column names for a table must be unique) | 114 <help>By default, table columns will be named: c1,c2,c3,...,cn (column names for a table must be unique) |
| 109 You can override the default names by entering a comma -separated list of names, e.g. ',name1,,,name2' would rename the second and fifth columns. | 115 You can override the default names by entering a comma -separated list of names, e.g. ',name1,,,name2' would rename the second and fifth columns. |
| 110 </help> | 116 </help> |
| 111 <sanitizer sanitize="False"/> | 117 <sanitizer sanitize="False"/> |
| 117 <validator type="regex" message="Column name">^([A-Za-z]\w*)?$</validator> | 123 <validator type="regex" message="Column name">^([A-Za-z]\w*)?$</validator> |
| 118 </param> | 124 </param> |
| 119 <repeat name="indexes" title="Table Index"> | 125 <repeat name="indexes" title="Table Index"> |
| 120 <param name="unique" type="boolean" truevalue="yes" falsevalue="no" checked="False" label="This is a unique index"/> | 126 <param name="unique" type="boolean" truevalue="yes" falsevalue="no" checked="False" label="This is a unique index"/> |
| 121 <param name="index_columns" type="text" value="" label="Index on Columns"> | 127 <param name="index_columns" type="text" value="" label="Index on Columns"> |
| 122 <help>Create an index on the column names: e,g, c1 or c2,c4</help> | 128 <help>Create an index on the column names: e.g. for default column names: c1 or c2,c4 ( use the names you gave for columns)</help> |
| 123 <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> | 129 <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> |
| 130 <sanitizer sanitize="False"/> | |
| 124 </param> | 131 </param> |
| 125 </repeat> | 132 </repeat> |
| 126 </section> | 133 </section> |
| 127 </repeat> | 134 </repeat> |
| 128 <param name="save_db" type="boolean" truevalue="yes" falsevalue="no" checked="false" label="Save the sqlite database in your history" | 135 <param name="save_db" type="boolean" truevalue="yes" falsevalue="no" checked="false" label="Save the sqlite database in your history" |
| 130 <param name="sqlquery" type="text" area="true" size="20x80" value="" optional="true" label="SQL Query to generate tabular output"> | 137 <param name="sqlquery" type="text" area="true" size="20x80" value="" optional="true" label="SQL Query to generate tabular output"> |
| 131 <help>By default: tables are named: t1,t2,...,tn and columns in each table: c1,c2,...,cn</help> | 138 <help>By default: tables are named: t1,t2,...,tn and columns in each table: c1,c2,...,cn</help> |
| 132 <sanitizer sanitize="False"/> | 139 <sanitizer sanitize="False"/> |
| 133 <validator type="regex" message="">^(?ims)\s*select\s+.*\s+from\s+.*$</validator> | 140 <validator type="regex" message="">^(?ims)\s*select\s+.*\s+from\s+.*$</validator> |
| 134 </param> | 141 </param> |
| 135 <param name="no_header" type="boolean" truevalue="-n" falsevalue="" checked="False" label="Omit column headers from tabular output"/> | 142 <expand macro="result_results_header_line" /> |
| 136 </inputs> | 143 </inputs> |
| 137 <outputs> | 144 <outputs> |
| 138 <data format="sqlite" name="sqlitedb" label="sqlite db of ${on_string}"> | 145 <data format="sqlite" name="sqlitedb" label="sqlite db of ${on_string}"> |
| 139 <filter>save_db</filter> | 146 <filter>save_db</filter> |
| 140 </data> | 147 </data> |
| 389 </repeat> | 396 </repeat> |
| 390 <param name="sqlquery" value="SELECT people.id,first,last,dob,name,animal,pets FROM people JOIN pet ON people.id = pet.id WHERE animal = 'cat'"/> | 397 <param name="sqlquery" value="SELECT people.id,first,last,dob,name,animal,pets FROM people JOIN pet ON people.id = pet.id WHERE animal = 'cat'"/> |
| 391 <output name="output" file="pet_normalized_query_results.tsv"/> | 398 <output name="output" file="pet_normalized_query_results.tsv"/> |
| 392 </test> | 399 </test> |
| 393 | 400 |
| 401 <test> | |
| 402 <repeat name="tables"> | |
| 403 <param name="table" ftype="tabular" value="psm_report.tsv"/> | |
| 404 <section name="input_opts"> | |
| 405 <repeat name="linefilters"> | |
| 406 <conditional name="filter"> | |
| 407 <param name="filter_type" value="select_columns"/> | |
| 408 <param name="columns" value="1,3,2,6,14,19"/> | |
| 409 </conditional> | |
| 410 </repeat> | |
| 411 </section> | |
| 412 <section name="tbl_opts"> | |
| 413 <param name="table_name" value="PSMs"/> | |
| 414 <param name="column_names_from_first_line" value="True"/> | |
| 415 <param name="col_names" value="Scan"/> | |
| 416 </section> | |
| 417 </repeat> | |
| 418 <param name="sqlquery" value="SELECT * from PSMs"/> | |
| 419 <conditional name="query_result"> | |
| 420 <param name="header" value="yes"/> | |
| 421 <param name="header_prefix" value=""/> | |
| 422 </conditional> | |
| 423 <output name="output" file="psm_report_out1.tsv"/> | |
| 424 </test> | |
| 425 | |
| 426 <test> | |
| 427 <repeat name="tables"> | |
| 428 <param name="table" ftype="tabular" value="psm_report.tsv"/> | |
| 429 <section name="input_opts"> | |
| 430 <repeat name="linefilters"> | |
| 431 <conditional name="filter"> | |
| 432 <param name="filter_type" value="select_columns"/> | |
| 433 <param name="columns" value="1,3,2,6,14,19"/> | |
| 434 </conditional> | |
| 435 </repeat> | |
| 436 </section> | |
| 437 <section name="tbl_opts"> | |
| 438 <param name="table_name" value="PSMs"/> | |
| 439 <param name="column_names_from_first_line" value="True"/> | |
| 440 <param name="col_names" value="Scan"/> | |
| 441 </section> | |
| 442 </repeat> | |
| 443 <param name="sqlquery" value="SELECT Scan,"m/z", "Precursor m/z Error [ppm]", Sequence, "Protein(s)" FROM PSMs WHERE NOT re_search(', ',"Protein(s)")"/> | |
| 444 <conditional name="query_result"> | |
| 445 <param name="header" value="yes"/> | |
| 446 <param name="header_prefix" value=""/> | |
| 447 </conditional> | |
| 448 <output name="output" file="psm_report_out2.tsv"/> | |
| 449 </test> | |
| 450 | |
| 394 </tests> | 451 </tests> |
| 395 <help><