comparison obigrep.xml @ 0:1aa790551187 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/obitools commit e1031e4c94b25d1ed535bf221764ab801b710ab2
author iuc
date Wed, 12 Apr 2017 17:36:41 -0400
parents
children 71cb8b117c05
comparison
equal deleted inserted replaced
-1:000000000000 0:1aa790551187
1 <tool id="obi_grep" name="obigrep" version="@WRAPPER_VERSION@">
2 <description>Filters sequence file</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="requirements"/>
7 <expand macro="stdio"/>
8
9 <command>
10
11 <![CDATA[
12 obigrep
13 ${v}
14 #if str($options_grep.options_grep_selector) == 'sequence'
15 -s ${options_grep.sequence}
16 #else if str($options_grep.options_grep_selector) == 'definition'
17 -D ${options_grep.definition}
18 #else if str($options_grep.options_grep_selector) == 'identifier'
19 -I ${options_grep.identifier}
20 #else if str($options_grep.options_grep_selector) == 'idlist'
21 --id-list '$options_grep.idlist}
22 #else if str($options_grep.options_grep_selector) == 'attribute'
23 -a ${options_grep.attribute}
24 #else if str($options_grep.options_grep_selector) == 'hasattribute'
25 -A ${options_grep.attribute}
26 #else if str($options_grep.options_grep_selector) == 'predicat'
27 -p ${options_grep.predicat}
28 #else if str($options_grep.options_grep_selector) == 'lmax'
29 -L ${options_grep.lmax}
30 #else if str($options_grep.options_grep_selector) == 'lmin'
31 -l ${options_grep.lmin}
32 #end if
33 '$input' > '$output'
34 ]]>
35
36 </command>
37
38 <inputs>
39 <param name="input" type="data" format="fasta,fastq" label="Input sequences file" />
40 <conditional name="options_grep">
41 <param name="options_grep_selector" type="select" label="Choose the sequence record selection option" >
42 <option value="sequence" selected="true">sequence</option>
43 <option value="definition">definition</option>
44 <option value="identifier">identifier</option>
45 <option value="idlist">idlist</option>
46 <option value="attribute">attribute</option>
47 <option value="hasattribute">hasattribute</option>
48 <option value="predicat">predicat</option>
49 <option value="lmax">lmax</option>
50 <option value="lmin">lmin</option>
51 </param>
52 <when value="sequence">
53 <param name="sequence" type="text" label="Regular expression pattern to be tested against the sequence itself. The pattern is case insensitive." >
54 <expand macro="sanitizer" />
55 </param>
56 </when>
57 <when value="definition">
58 <param name="definition" type="text" label="Regular expression pattern to be tested against the definition of the sequence record. The pattern is case sensitive." >
59 <expand macro="sanitizer" />
60 </param>
61 </when>
62 <when value="identifier">
63 <param name="identifier" type="text" label="Regular expression pattern to be tested against the identifier of the sequence record. The pattern is case sensitive." >
64 <expand macro="sanitizer" />
65 </param>
66 </when>
67 <when value="idlist">
68 <param name="idlist" type="data" format="txt,tabular" label="points to a text file containing the list of sequence record identifiers to be selected. The file format consists in a single identifier per line." />
69 </when>
70 <when value="attribute">
71 <param name="attribute" type="text" label="Regular expression pattern matched against the attributes of the sequence record. the value of this attribute is of the form : key:regular_pattern. The pattern is case sensitive." >
72 <expand macro="sanitizer" />
73 </param>
74 </when>
75 <when value="hasattribute">
76 <param name="hasattribute" type="text" label="Selects sequence records having an attribute who is key." >
77 <expand macro="sanitizer" />
78 </param>
79 </when>
80 <when value="predicat">
81 <param name="predicat" type="text" label="Python boolean expression to be evaluated for each sequence record." help="The attribute keys defined for each sequence record can be used in the expression as variable names. An extra variable named sequenceefers to the sequence record itself." >
82 <expand macro="sanitizer" />
83 </param>
84 </when>
85 <when value="lmax">
86 <param name="lmax" type="text" label="lmax" help="Keeps sequence records whose sequence length is equal or shorter than lmax" />
87 </when>
88 <when value="lmin">
89 <param name="lmin" type="text" label="lmin" help="Keeps sequence records whose sequence length is equal or longer than lmin"/>
90 </when>
91 </conditional>
92
93 <param name="v" type="boolean" truevalue="-v" falsevalue="" checked="false" label="Invert the sequence record selection (option -v)" />
94 <param name="out_format" type="select" label="Output data type">
95 <option value="fasta">fasta</option>
96 <option value="fastq">fastq</option>
97 </param>
98
99 </inputs>
100 <outputs>
101 <data format="fastq" name="output" label="output with ${tool.name} on ${on_string}" >
102 <change_format>
103 <when input="out_format" value="fasta" format="fasta" />
104 </change_format>
105 </data>
106 </outputs>
107 <tests>
108 <test>
109 <param name="input" value="illuminapairedend.output.fastq" />
110 <conditional name="options_grep">
111 <param name="options_grep_selector" value="lmin"/>
112 <param name="lmin" value="80"/>
113 </conditional>
114 <param name="v" value="true" />
115 <param name="out_format" value="fastq" />
116 <output name="output" file="output_obigrep_lmin.fastq" ftype="fastq"/>
117 </test>
118 <test>
119 <param name="input" value="illuminapairedend.output.fastq" />
120 <conditional name="options_grep">
121 <param name="options_grep_selector" value="predicat"/>
122 <param name="predicat" value='mode!="joined"'/>
123 </conditional>
124 <param name="v" value="false" />
125 <param name="out_format" value="fasta" />
126 <output name="output" file="output_obigrep_predicat.fasta" ftype="fasta"/>
127 </test>
128 </tests>
129 <help><![CDATA[
130
131 .. class:: infomark
132
133 **What it does**
134
135 The obigrep command is in some way analog to the standard Unix grep command. It selects a subset of sequence records from a sequence file.
136
137 A sequence record is a complex object composed of an identifier, a set of attributes (key=value), a definition, and the sequence itself.
138
139 Instead of working text line by text line as the standard Unix tool, selection is done sequence record by sequence record. A large set of options allows refining selection on any of the sequence record elements.
140
141 Moreover obigrep allows specifying simultaneously several conditions (that take the value TRUE or FALSE) and only the sequence records that fulfill all the conditions (all conditions are TRUE) are selected.
142
143 Sequence record selection options :
144 * sequence : Regular expression pattern to be tested against the sequence itself. ex: GAATTC
145
146 * definition : Regular expression pattern to be tested against the definition of the sequence record. ex: [Cc]hloroplast
147
148 * identifier : Regular expression pattern to be tested against the identifier of the sequence record. ex: ^GH
149
150 * idlist : points to a text file containing the list of sequence record identifiers to be selected.
151
152 * attribute : Regular expression pattern matched against the attributes of the sequence record. the value of this attribute is of the form : key:regular_pattern. ex:'family_name:Asteraceae'
153
154 * hasattribute : Selects sequence records having an attribute whose key = KEY.
155
156 * predicat : Python boolean expression to be evaluated for each sequence record. The attribute keys defined for each sequence record can be used in the expression as variable names. An extra variable named ‘sequence’ refers to the sequence record itself. ex: mode!="joined"
157
158 * lmax : Keeps sequence records whose sequence length is equal or shorter than lmax. ex : 100
159
160 * lmin : Selects sequence records whose sequence length is equal or longer than lmin. ex : 100
161
162 @OBITOOLS_LINK@
163
164 ]]>
165
166 </help>
167 <expand macro="citation" />
168
169 </tool>