diff head.xml @ 0:5314e5d6f040 draft

Imported from capsule None
author bgruening
date Thu, 29 Jan 2015 07:53:17 -0500
parents
children 37e1eb05b1b4
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head.xml	Thu Jan 29 07:53:17 2015 -0500
@@ -0,0 +1,62 @@
+<tool id="tp_head_tool" name="Select first" version="@BASE_VERSION@.0">
+    <description>lines from a dataset (head)</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <version_command>head --version | head -n 1</version_command>
+    <command>
+<![CDATA[
+        head
+            --lines
+            $complement$count
+            '${infile}'
+            > '${outfile}'
+]]>
+    </command>
+    <inputs>
+        <param name="infile" type="data" format="txt" label="File to select" />
+        <param name="complement" type="select" label="Operation">
+            <option value="">Keep first lines</option>
+            <option value="-">Remove last lines</option>
+        </param>
+        <param name="count" type="integer" size="5" value="10"
+            label="Number of lines" help="These will be kept/discarded depending on 'operation'. (--lines)" />
+    </inputs>
+    <outputs>
+        <data name="outfile" format_source="infile" metadata_source="infile"/>
+    </outputs>
+    <tests>
+        <test>
+            <param name="count" value="10"/>
+            <param name="infile" value="1.bed"/>
+            <output name="outfile" file="head_results1.bed"/>
+        </test>
+    </tests>
+    <help>
+<![CDATA[
+**What it does**
+
+This tool outputs specified number of lines from the **beginning** of a dataset
+
+-----
+
+**Example**
+
+Selecting 2 lines from this::
+
+    chr7  56632  56652  D17003_CTCF_R6  310  +
+    chr7  56736  56756  D17003_CTCF_R7  354  +
+    chr7  56761  56781  D17003_CTCF_R4  220  +
+    chr7  56772  56792  D17003_CTCF_R7  372  +
+    chr7  56775  56795  D17003_CTCF_R4  207  +
+
+will produce::
+
+    chr7  56632  56652  D17003_CTCF_R6  310  +
+    chr7  56736  56756  D17003_CTCF_R7  354  +
+
+@REFERENCES@
+]]>
+    </help>
+</tool>