0
|
1 <tool id="tp_head_tool" name="Select first" version="@BASE_VERSION@.0">
|
|
2 <description>lines from a dataset (head)</description>
|
|
3 <macros>
|
|
4 <import>macros.xml</import>
|
|
5 </macros>
|
|
6 <expand macro="requirements" />
|
|
7 <version_command>head --version | head -n 1</version_command>
|
|
8 <command>
|
|
9 <![CDATA[
|
|
10 head
|
|
11 --lines
|
|
12 $complement$count
|
|
13 '${infile}'
|
|
14 > '${outfile}'
|
|
15 ]]>
|
|
16 </command>
|
|
17 <inputs>
|
|
18 <param name="infile" type="data" format="txt" label="File to select" />
|
|
19 <param name="complement" type="select" label="Operation">
|
|
20 <option value="">Keep first lines</option>
|
|
21 <option value="-">Remove last lines</option>
|
|
22 </param>
|
|
23 <param name="count" type="integer" size="5" value="10"
|
|
24 label="Number of lines" help="These will be kept/discarded depending on 'operation'. (--lines)" />
|
|
25 </inputs>
|
|
26 <outputs>
|
|
27 <data name="outfile" format_source="infile" metadata_source="infile"/>
|
|
28 </outputs>
|
|
29 <tests>
|
|
30 <test>
|
|
31 <param name="count" value="10"/>
|
|
32 <param name="infile" value="1.bed"/>
|
|
33 <output name="outfile" file="head_results1.bed"/>
|
|
34 </test>
|
|
35 </tests>
|
|
36 <help>
|
|
37 <![CDATA[
|
|
38 **What it does**
|
|
39
|
|
40 This tool outputs specified number of lines from the **beginning** of a dataset
|
|
41
|
|
42 -----
|
|
43
|
|
44 **Example**
|
|
45
|
|
46 Selecting 2 lines from this::
|
|
47
|
|
48 chr7 56632 56652 D17003_CTCF_R6 310 +
|
|
49 chr7 56736 56756 D17003_CTCF_R7 354 +
|
|
50 chr7 56761 56781 D17003_CTCF_R4 220 +
|
|
51 chr7 56772 56792 D17003_CTCF_R7 372 +
|
|
52 chr7 56775 56795 D17003_CTCF_R4 207 +
|
|
53
|
|
54 will produce::
|
|
55
|
|
56 chr7 56632 56652 D17003_CTCF_R6 310 +
|
|
57 chr7 56736 56756 D17003_CTCF_R7 354 +
|
|
58
|
|
59 @REFERENCES@
|
|
60 ]]>
|
|
61 </help>
|
|
62 </tool>
|