comparison twobit_info.xml @ 0:b4590c39c70d draft default tip

planemo upload commit c1f0c5ceaac87b6b1db12160a8f5b287635db61b
author yating-l
date Mon, 10 Jul 2017 12:49:31 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:b4590c39c70d
1 <?xml version="1.0"?>
2 <tool id="twobit_info" name="twoBitInfo" version="1.0">
3 <description>Get sequence information from a twoBit file</description>
4
5 <macros>
6 <import>ucsc_macros.xml</import>
7 </macros>
8
9 <expand macro="requirements_twobit" />
10
11 <command detect_errors="exit_code">
12 <![CDATA[
13 #if str($output_type.output_type_selector) == "Sequence_Lengths":
14 twoBitInfo
15 ${output_type.no_Ns} "${twobit_input}" stdout |
16 sort -k 2,2nr > "${output}"
17 #else:
18 twoBitInfo -nBed "${twobit_input}" stdout |
19 sort -k 1,1 -k 2,2n |
20 awk 'BEGIN { OFS = "\t" } { print $1, $2, $3, sprintf("gap_%d", idx++ ) }'
21 > "${output}"
22 #end if
23 ]]>
24 </command>
25
26 <expand macro="environment_LC_COLLATE" />
27
28 <inputs>
29 <param name="twobit_input" type="data" format="twobit" label="twoBit input file" />
30
31 <conditional name="output_type">
32 <!--
33 Because the "when" element in the "data" output does not allow the "label"
34 attribute, the value from the output_type_selector is used as part of the
35 label to help users distinguish the different types of output produced by
36 this tool. The option values are in uppercase so that they conform to the
37 naming convention of the History items that are displayed to the user.
38 -->
39 <param name="output_type_selector" type="select"
40 label="Type of output file">
41 <option value="Sequence_Lengths" selected="true">Sequence lengths</option>
42 <option value="Gaps">BED records of gaps in each sequence</option>
43 </param>
44
45 <when value="Sequence_Lengths">
46 <param name="no_Ns" type="boolean" checked="false"
47 truevalue="-noNs" falsevalue=""
48 label="Exclude gaps (N's) from sequence length"
49 help="-noNs" />
50 </when>
51
52 <when value="Gaps"></when>
53 </conditional>
54 </inputs>
55 <outputs>
56 <data name="output" format="len"
57 label="${tool.name} on ${on_string}: ${output_type.output_type_selector}">
58 <change_format>
59 <when input="output_type.output_type_selector" value="Gaps" format="bed" />
60 </change_format>
61 </data>
62 </outputs>
63 <tests>
64 <test>
65 <!-- Test report sequence length -->
66 <param name="twobit_input" value="contigs.2bit" ftype="twobit" />
67 <param name="output_type_selector" value="Sequence_Lengths" />
68 <output name="output" file="contigs_chromInfo.tab" />
69 </test>
70 <test>
71 <!-- Test report sequence length excluding gaps -->
72 <param name="twobit_input" value="contigs.2bit" ftype="twobit" />
73 <param name="output_type_selector" value="Sequence_Lengths" />
74 <param name="no_Ns" value="-noNs" />
75 <output name="output" file="contigs_no_Ns_chromInfo.tab" />
76 </test>
77 <test>
78 <!-- Test report gap BED file -->
79 <param name="twobit_input" value="contigs.2bit" ftype="twobit" />
80 <param name="output_type_selector" value="Gaps" />
81 <output name="output" file="contigs_gaps.bed" />
82 </test>
83 </tests>
84 <help>
85 <![CDATA[
86 **What it does**
87
88 twoBitInfo reports the length of each scaffold and the gap locations
89 stored in a twoBit Sequence Archive.
90
91 ]]></help>
92
93 <expand macro="citations" />
94 </tool>