comparison enasearch_search_data.xml @ 0:fc42e7901a23 draft

planemo upload for repository https://github.com/ASaiM/galaxytools/tree/master/tools/enasearch/ commit 6eda25f5cccc0cf9be09c38a8b48d37aff56ed87
author iuc
date Tue, 29 Aug 2017 04:13:28 -0400
parents
children 6e692d5a5599
comparison
equal deleted inserted replaced
-1:000000000000 0:fc42e7901a23
1 <tool id="enasearch_search_data" name="Search ENA data" version="@WRAPPER_VERSION@.0">
2 <description>given a query</description>
3 <macros>
4 <import>macros.xml</import>
5 <import>search_macros.xml</import>
6 </macros>
7 <expand macro="requirements"/>
8 <expand macro="version"/>
9 <command detect_errors="aggressive"><![CDATA[
10 enasearch
11 search_data
12 $query_type.free_text_search
13 #if $query_type.free_text_search == '--free_text_search'
14 --query '$query_type.query'
15 --result '$query_type.res.result'
16 @SEARCH_DATA_DISPLAY@
17 #else
18 --result '$query_type.res.result'
19 #set $queries=''
20 #set $sep=''
21 #for $i, $s in enumerate( $query_type.res.queries )
22 #if $sep == ''
23 #set $sep = str($s.combination_operation)
24 #else
25 #set $sep = str($s.combination_operation)
26 #set $queries += ' %s ' % ($sep)
27 #end if
28 #if $s.filter_field.field != 'location'
29 #set $queries += '%s' % (str($s.filter_field.field))
30 #if str($s.filter_field.operation) == "equal"
31 #set $queries += '='
32 #elif str($s.filter_field.operation) == "different"
33 #set $queries += '!='
34 #elif str($s.filter_field.operation) == "lower"
35 #set $queries += '<'
36 #elif str($s.filter_field.operation) == "equal or lower"
37 #set $queries += '<='
38 #elif str($s.filter_field.operation) == "higher"
39 #set $queries += '>'
40 #elif str($s.filter_field.operation) == "equal or higher"
41 #set $queries += '>='
42 #end if
43 #set $queries += '"%s"' % (str($s.filter_field.value))
44 #else
45 #set $queries += '%s(%s)' % (str($s.filter_field.operation),str($s.filter_field.values))
46 #end if
47 #end for
48 --query '$queries'
49 @SEARCH_DATA_DISPLAY@
50 #end if
51 --file '$output'
52 --download 'txt'
53 ]]></command>
54 <inputs>
55 <conditional name="query_type">
56 <param argument="--free_text_search" type="select" label="Use free text search?" help="If not, the ENA data warehouse is used">
57 <option value="--free_text_search">Yes</option>
58 <option value="">False</option>
59 </param>
60 <when value="--free_text_search">
61 <param argument="--query" type="text" label="Query"/>
62 <expand macro="free_text_search"/>
63 </when>
64 <when value="">
65 <expand macro="conditional_text_search"/>
66 </when>
67 </conditional>
68 </inputs>
69 <outputs>
70 <data name="output" format="tabular" label="${tool.name}">
71 <change_format>
72 <when input="query_type.res.display_opt.display" value="fasta" format="fasta" />
73 <when input="query_type.res.display_opt.display" value="fastq" format="fastq" />
74 <when input="query_type.res.display_opt.display" value="html" format="html" />
75 <when input="query_type.res.display_opt.display" value="text" format="text" />
76 <when input="query_type.res.display_opt.display" value="xml" format="xml" />
77 </change_format>
78 </data>
79 </outputs>
80 <tests>
81 <test>
82 <conditional name="query_type">
83 <param name="free_text_search" value="--free_text_search"/>
84 <param name="query" value="kinase+homo+sapiens"/>
85 <conditional name="res">
86 <param name="result" value="sequence_update"/>
87 <conditional name="display_opt">
88 <param name="display" value="fasta"/>
89 </conditional>
90 </conditional>
91 </conditional>
92 <output name="output" ftype="fasta" md5="d02da99308bbf1e432fc5614c1982994"/>
93 </test>
94 <test>
95 <conditional name="query_type">
96 <param name="free_text_search" value="--free_text_search"/>
97 <param name="query" value="kinase+homo+sapiens"/>
98 <conditional name="res">
99 <param name="result" value="wgs_set"/>
100 <conditional name="display_opt">
101 <param name="display" value="report"/>
102 <param name="fields" value="accession,environmental_sample"/>
103 </conditional>
104 </conditional>
105 </conditional>
106 <output name="output" ftype="tabular" md5="c1f91a8276f59c90ec53025e1a3d31d5"/>
107 </test>
108 <test>
109 <conditional name="query_type">
110 <param name="free_text_search" value=""/>
111 <conditional name="res">
112 <param name="result" value="coding_release"/>
113 <repeat name="queries">
114 <param name="combination_operation" value="AND"/>
115 <conditional name="filter_field">
116 <param name="field" value="dataclass"/>
117 <param name="operation" value="equal"/>
118 <param name="value" value="STD"/>
119 </conditional>
120 </repeat>
121 <repeat name="queries">
122 <param name="combination_operation" value="AND"/>
123 <conditional name="filter_field">
124 <param name="field" value="tissue_lib"/>
125 <param name="operation" value="equal"/>
126 <param name="value" value="lambda gt11"/>
127 </conditional>
128 </repeat>
129 <conditional name="display_opt">
130 <param name="display" value="xml"/>
131 </conditional>
132 </conditional>
133 </conditional>
134 <output name="output" ftype="xml" md5="0ed405b4db2bcaf9c1540307fe15e9bb"/>
135 </test>
136 </tests>
137 <help><![CDATA[
138 **What it does**
139
140 This tool retrieve ENA taxon data
141 ]]></help>
142 <expand macro="citations"/>
143 </tool>