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