diff pg-query.xml @ 0:fa1a61331039 draft default tip

planemo upload for repository https://github.com/bgruening/galaxytools/tools/pgtools commit ab93c4c70fa487e55a24863a7786e102e7d92272
author bgruening
date Wed, 24 Apr 2019 06:12:05 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pg-query.xml	Wed Apr 24 06:12:05 2019 -0400
@@ -0,0 +1,55 @@
+<tool id="pg_query" name="Query" version="@PG_VERSION@">
+    <description>postgres database</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <command detect_errors="aggressive"><![CDATA[
+            @UNTAR_INFILE@ &&
+            @PG_START@ &&
+            ##ls -l ./postgresql &&
+            a=" with CSV HEADER DELIMITER '	';" &&
+            echo "COPY ($query) TO STDOUT"\$a | @PSQL@ -L logfile.log > '$outfile' &&
+            @PG_STOP@ 
+            &&
+            cat logfile.log
+    ]]>
+    </command>
+    <inputs>
+        <param name="infile" type="data" format="postgresql" label="Input database" />
+        <param name="query" type="text" area="True" size="5x50" label="The query to be issued to the database">
+            <sanitizer invalid_char="">
+                <valid initial="string.printable">
+                    <remove value="&apos;" />
+                </valid>
+                <mapping initial="none">
+                    <add source="&apos;" target="&apos;&quot;&apos;&quot;&apos;" />
+                </mapping>
+            </sanitizer>
+            <validator type="expression" message="Query cannot be empty">value.strip()</validator>
+         </param>
+    </inputs>
+    <outputs>
+        <data format="txt" name="outfile" />
+    </outputs>
+    <tests>
+        <test>
+            <param name="infile" value="pg_import_result1.pg.tar.bz2" ftype="postgresql" />
+            <param name="query" value="select version from migrate_version" />
+            <output file="pg_query_result1.txt" name="outfile" />
+        </test>
+        <test>
+            <param name="infile" value="pg_import_result1.pg.tar.bz2" ftype="postgresql" />
+            <param name="query" value="select * from galaxy_user" />
+            <output file="pg_query_result2.txt" name="outfile" />
+        </test>
+    </tests>
+    <help>
+<![CDATA[
+
+@HELP_FOOTER@
+
+]]>
+    </help>
+    <expand macro="citations" />
+</tool>