diff head.xml @ 4:56e80527c482 draft

Uploaded
author bgruening
date Wed, 07 Jan 2015 11:10:52 -0500
parents 7068d1548234
children 8928e6d1e7ba
line wrap: on
line diff
--- a/head.xml	Sun Oct 06 08:22:36 2013 -0400
+++ b/head.xml	Wed Jan 07 11:10:52 2015 -0500
@@ -1,29 +1,28 @@
-<tool id="tp_head_tool" name="Select first" version="0.1.1">
+<tool id="tp_head_tool" name="Select first" version="@BASE_VERSION@.0">
     <description>lines from a dataset (head)</description>
-    <requirements>
-        <requirement type="package" version="8.21">gnu_coreutils</requirement>
-    </requirements>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <version_command>head --version | head -n 1</version_command>
     <command>
-        head --lines $complement$count '${infile}' &gt; '${outfile}'
+<![CDATA[
+        head
+            --lines
+            $complement$count
+            '${infile}'
+            > '${outfile}'
+]]>
     </command>
-
     <inputs>
-        <param format="txt" name="infile" type="data" label="File to select" />
-
+        <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').">
-            <sanitizer>
-                <valid initial="string.printable">
-                    <remove value="&apos;"/>
-                </valid>
-            </sanitizer>
-        </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 format="input" name="outfile" metadata_source="infile"/>
     </outputs>
@@ -31,11 +30,11 @@
         <test>
             <param name="count" value="10"/>
             <param name="infile" value="1.bed"/>
-            <output name="out_file1" file="eq-showbeginning.dat"/>
+            <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
@@ -57,6 +56,7 @@
     chr7  56632  56652  D17003_CTCF_R6  310  +
     chr7  56736  56756  D17003_CTCF_R7  354  +
 
-
+@REFERENCES@
+]]>
     </help>
 </tool>