annotate query_tabular.xml @ 23:5bb148ee644a draft default tip

Deleted selected files
author jjohnson
date Mon, 17 Jul 2017 15:22:38 -0400
parents bed5018e7ae3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22
bed5018e7ae3 Uploaded
jjohnson
parents: 21
diff changeset
1 <tool id="query_tabular" name="Query Tabular" version="5.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
20
ab27c4bd14b9 Uploaded
jjohnson
parents: 18
diff changeset
4 <macros>
ab27c4bd14b9 Uploaded
jjohnson
parents: 18
diff changeset
5 <import>macros.xml</import>
ab27c4bd14b9 Uploaded
jjohnson
parents: 18
diff changeset
6 </macros>
ab27c4bd14b9 Uploaded
jjohnson
parents: 18
diff changeset
7
0
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
8 <requirements>
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
9 </requirements>
21
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
10
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
11 <command detect_errors="exit_code"><![CDATA[
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
12 cat '$query_file' &&
6
03842a4f71c6 Uploaded
jjohnson
parents: 5
diff changeset
13 #if $add_to_database.withdb:
03842a4f71c6 Uploaded
jjohnson
parents: 5
diff changeset
14 #if $save_db:
21
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
15 cp '$add_to_database.withdb' '$sqlitedb' &&
6
03842a4f71c6 Uploaded
jjohnson
parents: 5
diff changeset
16 #else:
21
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
17 cp '$add_to_database.withdb' '$workdb' &&
6
03842a4f71c6 Uploaded
jjohnson
parents: 5
diff changeset
18 #end if
03842a4f71c6 Uploaded
jjohnson
parents: 5
diff changeset
19 #end if
21
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
20 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
21 #if $save_db
21
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
22 -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
23 #else
21
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
24 -s '$workdb'
0
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
25 #end if
21
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
26 -j '$table_json'
0
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
27 #if $sqlquery:
21
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
28 -Q '$query_file'
0
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
29 $no_header
21
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
30 -o '$output'
0
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
31 #end if
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
32 ]]></command>
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
33 <configfiles>
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
34 <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
35 $sqlquery
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
36 </configfile>
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
37 <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
38 #import json
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 = dict()
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
40 #set $jtbls = []
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
41 #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
42 #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
43 #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
44 #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
45 #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
46 #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
47 #else
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
48 #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
49 #end if
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
50 #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
51 ## #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
52 ## #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
53 ## #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
54 #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
55 #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
56 #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
57 #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
58 #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
59 #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
60 #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
61 #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
62 #else
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
63 #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
64 #end if
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
65 #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
66 #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
67 #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
68 #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
69 #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
70 #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
71 #else:
9d73dca48178 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents: 3
diff changeset
72 #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
73 #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
74 #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
75 #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
76 #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
77 #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
78 #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
79 #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
80 #end if
20
ab27c4bd14b9 Uploaded
jjohnson
parents: 18
diff changeset
81 #set $linefilters = $tbl.input_opts.linefilters
ab27c4bd14b9 Uploaded
jjohnson
parents: 18
diff changeset
82 @LINEFILTERS@
6
03842a4f71c6 Uploaded
jjohnson
parents: 5
diff changeset
83 #if $input_filters:
03842a4f71c6 Uploaded
jjohnson
parents: 5
diff changeset
84 #set $jtbl['filters'] = $input_filters
03842a4f71c6 Uploaded
jjohnson
parents: 5
diff changeset
85 #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
86 #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
87 #end for
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
88 #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
89 </configfile>
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
90 </configfiles>
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
91 <inputs>
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
92 <param name="workdb" type="hidden" value="workdb.sqlite" label=""/>
6
03842a4f71c6 Uploaded
jjohnson
parents: 5
diff changeset
93 <section name="add_to_database" expanded="false" title="Add tables to an existing database">
03842a4f71c6 Uploaded
jjohnson
parents: 5
diff changeset
94 <param name="withdb" type="data" format="sqlite" optional="true" label="Add tables to this Database"
03842a4f71c6 Uploaded
jjohnson
parents: 5
diff changeset
95 help="Make sure your added table names are not already in this database"/>
03842a4f71c6 Uploaded
jjohnson
parents: 5
diff changeset
96 </section>
8
ae27dab228b8 Uploaded
jjohnson
parents: 6
diff changeset
97 <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
98 <param name="table" type="data" format="tabular" label="Tabular Dataset for Table"/>
6
03842a4f71c6 Uploaded
jjohnson
parents: 5
diff changeset
99 <section name="input_opts" expanded="false" title="Filter Dataset Input">
20
ab27c4bd14b9 Uploaded
jjohnson
parents: 18
diff changeset
100 <expand macro="macro_line_filters" />
6
03842a4f71c6 Uploaded
jjohnson
parents: 5
diff changeset
101 </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
102 <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
103 <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
104 <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
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>
9d73dca48178 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents: 3
diff changeset
106 </param>
11
fd16243931d6 Uploaded
jjohnson
parents: 8
diff changeset
107 <param name="col_names" type="text" value="" optional="true" label="Specify Column Names (comma-separated list)">
fd16243931d6 Uploaded
jjohnson
parents: 8
diff changeset
108 <help>By default, table columns will be named: c1,c2,c3,...,cn (column names for a table must be unique)
fd16243931d6 Uploaded
jjohnson
parents: 8
diff changeset
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.
fd16243931d6 Uploaded
jjohnson
parents: 8
diff changeset
110 </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
111 <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
112 <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
113 </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
114 <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
115 <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
116 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
117 <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
118 </param>
19ae309ec53c planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 29288f94a382686e263623cf6ddcd235ed5f2310-dirty
jjohnson
parents: 4
diff changeset
119 <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
120 <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
121 <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
122 <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
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>
9d73dca48178 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents: 3
diff changeset
124 </param>
9d73dca48178 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents: 3
diff changeset
125 </repeat>
9d73dca48178 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9893037a046e4f4c1e7ba859e05f49378c398cb1-dirty
jjohnson
parents: 3
diff changeset
126 </section>
0
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
127 </repeat>
20
ab27c4bd14b9 Uploaded
jjohnson
parents: 18
diff changeset
128 <param name="save_db" type="boolean" truevalue="yes" falsevalue="no" checked="false" label="Save the sqlite database in your history"
ab27c4bd14b9 Uploaded
jjohnson
parents: 18
diff changeset
129 help="SQLite to tabular tool can run additional queries on this database"/>
6
03842a4f71c6 Uploaded
jjohnson
parents: 5
diff changeset
130 <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
131 <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
132 <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
133 <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
134 </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
135 <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
136 </inputs>
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
137 <outputs>
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
138 <data format="sqlite" name="sqlitedb" label="sqlite db of ${on_string}">
20
ab27c4bd14b9 Uploaded
jjohnson
parents: 18
diff changeset
139 <filter>save_db</filter>
0
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
140 </data>
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
141 <data format="tabular" name="output" label="query results on ${on_string}">
20
ab27c4bd14b9 Uploaded
jjohnson
parents: 18
diff changeset
142 <filter>not save_db or (sqlquery and len(sqlquery.strip()) > 0)</filter>
0
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
143 </data>
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
144 </outputs>
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
145 <tests>
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
146 <test>
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
147 <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
148 <param name="table" ftype="tabular" value="customers.tsv"/>
21
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
149 <section name="input_opts">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
150 <repeat name="linefilters">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
151 <conditional name="filter">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
152 <param name="filter_type" value="comment"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
153 <param name="comment_char" value="35"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
154 </conditional>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
155 </repeat>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
156 </section>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
157 <section name="tbl_opts">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
158 <param name="table_name" value="customers"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
159 <param name="col_names" value="CustomerID,FirstName,LastName,Email,DOB,Phone"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
160 </section>
0
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
161 </repeat>
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
162 <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
163 <param name="table" ftype="tabular" value="sales.tsv"/>
21
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
164 <section name="input_opts">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
165 <repeat name="linefilters">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
166 <conditional name="filter">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
167 <param name="filter_type" value="comment"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
168 <param name="comment_char" value="35"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
169 </conditional>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
170 </repeat>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
171 </section>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
172 <section name="tbl_opts">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
173 <param name="table_name" value="sales"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
174 <param name="col_names" value="CustomerID,Date,SaleAmount"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
175 </section>
0
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
176 </repeat>
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
177 <param name="sqlquery" value="SELECT FirstName,LastName,sum(SaleAmount) as &quot;TotalSales&quot; 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
178 <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
179 </test>
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
180
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
181 <test>
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
182 <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
183 <param name="table" ftype="tabular" value="customers.tsv"/>
21
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
184 <section name="input_opts">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
185 <repeat name="linefilters">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
186 <conditional name="filter">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
187 <param name="filter_type" value="comment"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
188 <param name="comment_char" value="35"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
189 </conditional>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
190 </repeat>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
191 </section>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
192 <section name="tbl_opts">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
193 <param name="col_names" value=",FirstName,LastName,,DOB,"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
194 </section>
0
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
195 </repeat>
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
196 <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
197 <param name="table" ftype="tabular" value="sales.tsv"/>
21
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
198 <section name="input_opts">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
199 <repeat name="linefilters">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
200 <conditional name="filter">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
201 <param name="filter_type" value="skip"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
202 <param name="skip_lines" value="1"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
203 </conditional>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
204 </repeat>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
205 </section>
0
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
206 </repeat>
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
207 <param name="sqlquery" value="SELECT FirstName,LastName,sum(t2.c3) as &quot;TotalSales&quot; 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
208 <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
209 </test>
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
210
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
211 <test>
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
212 <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
213 <param name="table" ftype="tabular" value="customers.tsv"/>
21
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
214 <section name="input_opts">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
215 <repeat name="linefilters">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
216 <conditional name="filter">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
217 <param name="filter_type" value="skip"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
218 <param name="skip_lines" value="1"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
219 </conditional>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
220 </repeat>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
221 </section>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
222 <section name="tbl_opts">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
223 <param name="col_names" value=",FirstName,LastName,,BirthDate,"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
224 </section>
0
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
225 </repeat>
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="sqlquery" value="select FirstName,LastName,re_sub('^\d{2}(\d{2})-(\d\d)-(\d\d)','\3/\2/\1',BirthDate) as &quot;DOB&quot; 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
227 <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
228 </test>
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
229
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
230 <test>
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
231 <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
232 <param name="table" ftype="tabular" value="IEDB.tsv"/>
21
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
233 <section name="input_opts">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
234 <repeat name="linefilters">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
235 <conditional name="filter">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
236 <param name="filter_type" value="comment"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
237 <param name="comment_char" value="35"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
238 </conditional>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
239 </repeat>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
240 </section>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
241 <section name="tbl_opts">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
242 <param name="table_name" value="iedb"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
243 <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"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
244 </section>
0
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 <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
247 <param name="table" ftype="tabular" value="netMHC_summary.tsv"/>
21
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
248 <section name="input_opts">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
249 <repeat name="linefilters">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
250 <conditional name="filter">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
251 <param name="filter_type" value="skip"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
252 <param name="skip_lines" value="1"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
253 </conditional>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
254 </repeat>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
255 </section>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
256 <section name="tbl_opts">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
257 <param name="table_name" value="mhc_summary"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
258 <param name="col_names" value="pos,peptide,logscore,affinity,Bind_Level,Protein,Allele"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
259 </section>
0
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
260 </repeat>
21
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
261 <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,percentile_rank"/>
0
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
262 <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
263 </test>
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
264
18
b9f797bf4f38 Uploaded
jjohnson
parents: 16
diff changeset
265 <test>
21
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
266 <section name="add_to_database">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
267 <param name="withdb" ftype="sqlite" value="testdb.sqlite"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
268 </section>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
269 <repeat name="tables">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
270 <param name="table" ftype="tabular" value="pets.tsv"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
271 <section name="input_opts">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
272 <repeat name="linefilters">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
273 <conditional name="filter">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
274 <param name="filter_type" value="regex"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
275 <param name="regex_pattern" value="^\d+"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
276 <param name="regex_action" value="include_find"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
277 </conditional>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
278 </repeat>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
279 <repeat name="linefilters">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
280 <conditional name="filter">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
281 <param name="filter_type" value="comment"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
282 <param name="comment_char" value="35"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
283 </conditional>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
284 </repeat>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
285 <repeat name="linefilters">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
286 <conditional name="filter">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
287 <param name="filter_type" value="append_line_num"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
288 </conditional>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
289 </repeat>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
290 <repeat name="linefilters">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
291 <conditional name="filter">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
292 <param name="filter_type" value="select_columns"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
293 <param name="columns" value="7,2,3,4,1"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
294 </conditional>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
295 </repeat>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
296 <repeat name="linefilters">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
297 <conditional name="filter">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
298 <param name="filter_type" value="replace"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
299 <param name="column" value="c4"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
300 <param name="regex_pattern" value="(\d+)/(\d+)/(\d+)"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
301 <param name="regex_replace" value="19\3-\2-\1"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
302 </conditional>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
303 </repeat>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
304 </section>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
305 <section name="tbl_opts">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
306 <param name="table_name" value="people"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
307 <param name="col_names" value="id,first,last,dob,pets"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
308 </section>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
309 </repeat>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
310 <param name="sqlquery" value="SELECT people.id,first,last,pets,quote FROM people JOIN contacts ON people.first = contacts.first_name"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
311 <output name="output" file="add_to_db_results.tsv"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
312 </test>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
313
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
314 <test>
18
b9f797bf4f38 Uploaded
jjohnson
parents: 16
diff changeset
315 <repeat name="tables">
b9f797bf4f38 Uploaded
jjohnson
parents: 16
diff changeset
316 <param name="table" ftype="tabular" value="pets.tsv"/>
21
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
317 <section name="input_opts">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
318 <repeat name="linefilters">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
319 <conditional name="filter">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
320 <param name="filter_type" value="regex"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
321 <param name="regex_pattern" value="^\d+"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
322 <param name="regex_action" value="include_find"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
323 </conditional>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
324 </repeat>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
325 <repeat name="linefilters">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
326 <conditional name="filter">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
327 <param name="filter_type" value="comment"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
328 <param name="comment_char" value="35"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
329 </conditional>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
330 </repeat>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
331 <repeat name="linefilters">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
332 <conditional name="filter">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
333 <param name="filter_type" value="append_line_num"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
334 </conditional>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
335 </repeat>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
336 <repeat name="linefilters">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
337 <conditional name="filter">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
338 <param name="filter_type" value="select_columns"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
339 <param name="columns" value="7,2,3,4,1"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
340 </conditional>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
341 </repeat>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
342 <repeat name="linefilters">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
343 <conditional name="filter">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
344 <param name="filter_type" value="replace"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
345 <param name="column" value="c4"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
346 <param name="regex_pattern" value="(\d+)/(\d+)/(\d+)"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
347 <param name="regex_replace" value="19\3-\2-\1"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
348 </conditional>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
349 </repeat>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
350 </section>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
351 <section name="tbl_opts">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
352 <param name="table_name" value="people"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
353 <param name="col_names" value="id,first,last,dob,pets"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
354 </section>
18
b9f797bf4f38 Uploaded
jjohnson
parents: 16
diff changeset
355 </repeat>
b9f797bf4f38 Uploaded
jjohnson
parents: 16
diff changeset
356 <repeat name="tables">
b9f797bf4f38 Uploaded
jjohnson
parents: 16
diff changeset
357 <param name="table" ftype="tabular" value="pets.tsv"/>
21
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
358 <section name="input_opts">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
359 <repeat name="linefilters">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
360 <conditional name="filter">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
361 <param name="filter_type" value="regex"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
362 <param name="regex_pattern" value="^\d+"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
363 <param name="regex_action" value="include_find"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
364 </conditional>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
365 </repeat>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
366 <repeat name="linefilters">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
367 <conditional name="filter">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
368 <param name="filter_type" value="append_line_num"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
369 </conditional>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
370 </repeat>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
371 <repeat name="linefilters">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
372 <conditional name="filter">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
373 <param name="filter_type" value="select_columns"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
374 <param name="columns" value="c7,c5,c6"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
375 </conditional>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
376 </repeat>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
377 <repeat name="linefilters">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
378 <conditional name="filter">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
379 <param name="filter_type" value="normalize"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
380 <param name="columns" value="c2,c3"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
381 <param name="separator" value=","/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
382 </conditional>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
383 </repeat>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
384 </section>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
385 <section name="tbl_opts">
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
386 <param name="table_name" value="pet"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
387 <param name="col_names" value="id,name,animal"/>
357fe86f245d Uploaded
jjohnson
parents: 20
diff changeset
388 </section>
18
b9f797bf4f38 Uploaded
jjohnson
parents: 16
diff changeset
389 </repeat>
b9f797bf4f38 Uploaded
jjohnson
parents: 16
diff changeset
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'"/>
b9f797bf4f38 Uploaded
jjohnson
parents: 16
diff changeset
391 <output name="output" file="pet_normalized_query_results.tsv"/>
b9f797bf4f38 Uploaded
jjohnson
parents: 16
diff changeset
392 </test>
b9f797bf4f38 Uploaded
jjohnson
parents: 16
diff changeset
393
0
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
394 </tests>
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
395 <help><![CDATA[
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
396 =============
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
397 Query Tabular
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 **Inputs**
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 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
403
6
03842a4f71c6 Uploaded
jjohnson
parents: 5
diff changeset
404 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.
03842a4f71c6 Uploaded
jjohnson
parents: 5
diff changeset
405
03842a4f71c6 Uploaded
jjohnson
parents: 5
diff changeset
406
20
ab27c4bd14b9 Uploaded
jjohnson
parents: 18
diff changeset
407 @LINEFILTERS_HELP@
11
fd16243931d6 Uploaded
jjohnson
parents: 8
diff changeset
408
fd16243931d6 Uploaded
jjohnson
parents: 8
diff changeset
409
0
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
410 **Outputs**
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 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
413
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
414 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
415
5
19ae309ec53c planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 29288f94a382686e263623cf6ddcd235ed5f2310-dirty
jjohnson
parents: 4
diff changeset
416 *(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
417
19ae309ec53c planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 29288f94a382686e263623cf6ddcd235ed5f2310-dirty
jjohnson
parents: 4
diff changeset
418
20
ab27c4bd14b9 Uploaded
jjohnson
parents: 18
diff changeset
419 @QUERY_HELP@
0
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
420
20
ab27c4bd14b9 Uploaded
jjohnson
parents: 18
diff changeset
421 @LINEFILTERS_HELP_EXAMPLE@
11
fd16243931d6 Uploaded
jjohnson
parents: 8
diff changeset
422
fd16243931d6 Uploaded
jjohnson
parents: 8
diff changeset
423
14
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
424 Table name: pets
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
425
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
426 Table columns: Pets,FirstName,LastName,Birthdate,PetNames,PetType,line_num,entry_num,row_num
11
fd16243931d6 Uploaded
jjohnson
parents: 8
diff changeset
427
14
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
428 Query: SELECT * FROM pets
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
429
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
430 Result:
11
fd16243931d6 Uploaded
jjohnson
parents: 8
diff changeset
431
14
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
432 ====== ========== ======== ========== ========= ======== ========= ========== ========
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
433 #Pets FirstName LastName BirthDate PetNames PetType line_num entry_num row_num
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
434 ====== ========== ======== ========== ========= ======== ========= ========== ========
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
435 2 Paula Brown 1978-05-24 Rex dog 3 1 1
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
436 2 Paula Brown 1978-05-24 Fluff cat 3 1 2
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
437 1 Steven Jones 1974-04-04 Allie cat 4 2 3
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
438 0 Jane Doe 1978-05-24 5 3 4
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
439 1 James Smith 1980-10-20 Spot 6 4 5
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
440 ====== ========== ======== ========== ========= ======== ========= ========== ========
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
441
11
fd16243931d6 Uploaded
jjohnson
parents: 8
diff changeset
442
14
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
443 **Normalizing by Line Filtering into 2 Tables**
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
444
20
ab27c4bd14b9 Uploaded
jjohnson
parents: 18
diff changeset
445 *Relational database opertions work with single-valued column entries.
ab27c4bd14b9 Uploaded
jjohnson
parents: 18
diff changeset
446 To apply relational operations to tabular files that contain fields with lists of values,
ab27c4bd14b9 Uploaded
jjohnson
parents: 18
diff changeset
447 we need to "normalize" those fields, duplicating lines for each item in the list.
ab27c4bd14b9 Uploaded
jjohnson
parents: 18
diff changeset
448 In this example we create 2 tables, one for single-valued fields and a second with list-valued fields normalized.
ab27c4bd14b9 Uploaded
jjohnson
parents: 18
diff changeset
449 Becauce we add a line number first for each table, we can join the 2 tables on the line number column.*
ab27c4bd14b9 Uploaded
jjohnson
parents: 18
diff changeset
450 https://en.wikipedia.org/wiki/First_normal_form
ab27c4bd14b9 Uploaded
jjohnson
parents: 18
diff changeset
451
14
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
452 *People Table*
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
453
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
454 ::
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
455
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
456 Filter 1 - by regex expression matching [include]: '^\d+' (include lines that start with a number)
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
457 Filter 2 - append a line number column:
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
458 Filter 3 - regex replace value in column[4]: '(\d+)/(\d+)/(\d+)' '19\3-\2-\1' (convert dates to sqlite format)
16
5b4f6cf857cf Uploaded
jjohnson
parents: 14
diff changeset
459 Filter 4 - select columns 7,2,3,4,1
14
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
460
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
461 Table: People
16
5b4f6cf857cf Uploaded
jjohnson
parents: 14
diff changeset
462 Columns: id,FirstName,LastName,DOB,Pets
11
fd16243931d6 Uploaded
jjohnson
parents: 8
diff changeset
463
16
5b4f6cf857cf Uploaded
jjohnson
parents: 14
diff changeset
464 == ========= ======== ========== ====
5b4f6cf857cf Uploaded
jjohnson
parents: 14
diff changeset
465 id FirstName LastName DOB Pets
5b4f6cf857cf Uploaded
jjohnson
parents: 14
diff changeset
466 == ========= ======== ========== ====
5b4f6cf857cf Uploaded
jjohnson
parents: 14
diff changeset
467 1 Paula Brown 1978-05-24 2
5b4f6cf857cf Uploaded
jjohnson
parents: 14
diff changeset
468 2 Steven Jones 1974-04-04 1
5b4f6cf857cf Uploaded
jjohnson
parents: 14
diff changeset
469 3 Jane Doe 1978-05-24 0
5b4f6cf857cf Uploaded
jjohnson
parents: 14
diff changeset
470 4 James Smith 1980-10-20 1
5b4f6cf857cf Uploaded
jjohnson
parents: 14
diff changeset
471 == ========= ======== ========== ====
14
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
472
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
473
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
474 *Pet Table*
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
475
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
476 ::
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
477
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
478 Filter 1 - by regex expression matching [include]: '^\d+' (include lines that start with a number)
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
479 Filter 2 - append a line number column:
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
480 Filter 3 - by regex expression matching [exclude]: '^0\t' (exclude lines with no pets)
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
481 Filter 4 - normalize list columns[5,6]:
16
5b4f6cf857cf Uploaded
jjohnson
parents: 14
diff changeset
482 Filter 5 - select columns 7,5,6
11
fd16243931d6 Uploaded
jjohnson
parents: 8
diff changeset
483
14
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
484 Table: Pet
16
5b4f6cf857cf Uploaded
jjohnson
parents: 14
diff changeset
485 Columns: id,PetName,PetType
14
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
486
16
5b4f6cf857cf Uploaded
jjohnson
parents: 14
diff changeset
487 == ======== ========
5b4f6cf857cf Uploaded
jjohnson
parents: 14
diff changeset
488 id PetName PetType
5b4f6cf857cf Uploaded
jjohnson
parents: 14
diff changeset
489 == ======== ========
5b4f6cf857cf Uploaded
jjohnson
parents: 14
diff changeset
490 1 Rex dog
5b4f6cf857cf Uploaded
jjohnson
parents: 14
diff changeset
491 1 Fluff cat
5b4f6cf857cf Uploaded
jjohnson
parents: 14
diff changeset
492 2 Allie cat
5b4f6cf857cf Uploaded
jjohnson
parents: 14
diff changeset
493 4 Spot
5b4f6cf857cf Uploaded
jjohnson
parents: 14
diff changeset
494 == ======== ========
14
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
495
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
496
20
ab27c4bd14b9 Uploaded
jjohnson
parents: 18
diff changeset
497 Query: SELECT FirstName,LastName,PetName FROM People JOIN Pet ON People.id = Pet.id WHERE PetType = 'cat';
14
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
498
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
499 Result:
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
500
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
501 ========= ======== ========
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
502 FirstName LastName PetName
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
503 ========= ======== ========
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
504 Paula Brown Fluff
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
505 Steven Jones Allie
3003fe70f297 Uploaded
jjohnson
parents: 11
diff changeset
506 ========= ======== ========
11
fd16243931d6 Uploaded
jjohnson
parents: 8
diff changeset
507
0
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
508
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
509 ]]></help>
926c62f7fa09 planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/query_tabular commit 9ae87502ea7c3da33ecc453872c4eb2f41ecea4a-dirty
jjohnson
parents:
diff changeset
510 </tool>