diff sqlite_to_tabular.xml @ 0:859064f07be4 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/query_tabular commit 74915fc9cee746bbce1c4b507e13231259de177d
author iuc
date Tue, 18 Jul 2017 09:07:26 -0400
parents
children c1b700bc0150
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sqlite_to_tabular.xml	Tue Jul 18 09:07:26 2017 -0400
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<tool id="sqlite_to_tabular" name="SQLite to tabular" version="1.0.0">
+    <description>for SQL query</description>
+
+    <macros>
+         <import>macros.xml</import>
+    </macros>
+
+    <command detect_errors="exit_code"><![CDATA[
+    python '$__tool_directory__/sqlite_to_tabular.py'
+    --sqlitedb='$sqlitedb' 
+    --query_file='$query_file'
+    $no_header 
+    --output='$query_results'
+    ]]></command>
+    <configfiles>
+        <configfile name="query_file">
+$sqlquery
+        </configfile>
+    </configfiles>
+    <inputs>
+        <param name="sqlitedb" type="data" format="sqlite" label="SQLite Database"/>
+        <param name="sqlquery" type="text" area="True" size="120x20" label="SQL query">
+            <validator type="regex">(?ims)^\s*SELECT\s.*\sFROM\s.*$</validator>
+            <sanitizer sanitize="False"/>
+        </param>
+        <param name="no_header" type="boolean" truevalue="-n" falsevalue="" checked="False" label="Omit column headers"/>
+    </inputs>
+    <outputs>
+        <data name="query_results" format="tabular" />
+    </outputs>
+    <tests>
+        <test>
+            <param name="sqlitedb" ftype="sqlite" value="testdb.sqlite" />
+            <param name="sqlquery" value="SELECT first_name, last_name, age FROM contacts WHERE first_name = 'Sam'" />
+            <output name="query_results">
+                <assert_contents>
+                    <has_text text="Smith" />
+                    <not_has_text text="Doe" />
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help><![CDATA[
+=================
+SQLite to Tabular
+=================
+
+**Inputs**
+
+  An existing SQLite_ data base.
+
+
+**Outputs**
+
+  The results of a SQL query are output to the history as a tabular file.
+
+
+
+@QUERY_HELP@
+
+    ]]></help>
+</tool>