comparison galaxy/wrappers/FactorFileGenerator.xml @ 1:7a520f7169e1 draft

"planemo upload for repository https://github.com/juliechevalier/GIANT/tree/master commit e2b27d6ff2eab66454f984dbf1a519192f41db97"
author vandelj
date Wed, 09 Sep 2020 10:29:24 +0000
parents 4764dc6a1019
children
comparison
equal deleted inserted replaced
0:4764dc6a1019 1:7a520f7169e1
1 <tool name="GIANT-Factor file generator" id="giant_factor_generator" version="0.1.2"> 1 <tool name="GIANT-Factor file generator" id="giant_factor_generator" version="0.1.3">
2 <description>Generate factor file used by other GIANT tools</description> 2 <description>Generate factor file used by other GIANT tools</description>
3 <requirements> 3 <requirements>
4 </requirements> 4 </requirements>
5 <code file="../../src/General_functions.py"/> 5 <code file="../../src/General_functions.py"/>
6 <!--<code file="./src/General_functions.py"/> change for Planemo test-->
6 <stdio> 7 <stdio>
7 <regex match="Execution halted" 8 <regex match="Execution halted"
8 source="both" 9 source="both"
9 level="fatal" 10 level="fatal"
10 description="Execution halted, please contact tool developer or administrators." /> 11 description="Execution halted, please contact tool developer or administrators." />
16 </stdio> 17 </stdio>
17 <command> <![CDATA[ 18 <command> <![CDATA[
18 19
19 #import imp 20 #import imp
20 #set $general_functions=$imp.load_source('General_functions', $__tool_directory__+'/../../src/General_functions.py') 21 #set $general_functions=$imp.load_source('General_functions', $__tool_directory__+'/../../src/General_functions.py')
21 22 ##change for Planemo test
22 #set $ret_code=$general_functions.generateFactorFile($inputCondition['inputData'],$factorsSection['factorList'],$outputData.file_name,$log.file_name) 23 ##set $general_functions=$imp.load_source('General_functions', $__tool_directory__+'/src/General_functions.py')
24
25 #if $inputCondition.selection == "CELcollection" and $inputCondition.selectCollectionStrat.how=="group_tags":
26 #set $temp_factor_names = list()
27 #for $factor in $inputCondition.selectCollectionStrat.factorListBis:
28 #set $temp_factor = list()
29 #for $level in $factor.valueList:
30 #set $temp_level = ''
31 #for $group in $level.valueConditions.value:
32 #for $file in $inputCondition.inputData.get_datasets_for_group($group):
33 printf "$group\t $file.element_identifier\n" >> ./TAGmatching.csv;
34 #if $temp_level == '':
35 #set $temp_level = str($file.element_identifier)
36 #else:
37 #set $temp_level += ','+str($file.element_identifier)
38 #end if
39 #end for
40 #end for
41 $temp_factor.append( {'valueName':str($level.valueName), 'valueConditions':$temp_level} )
42 #end for
43 $temp_factor.reverse()
44 $temp_factor_names.append( {'factorName':str($factor.factorName), 'valueList':$temp_factor} )
45 #end for
46 #end if
47
48 #if $inputCondition.selection == "CELcollection":
49 #if $inputCondition.selectCollectionStrat.how=="group_tags":
50 #set $ret_code=$general_functions.generateFactorFile($inputCondition.inputData.collection,$temp_factor_names,$outputData.file_name,$log.file_name)
51 #else:
52 #set $ret_code=$general_functions.generateFactorFile($inputCondition.inputData.collection,$inputCondition.selectCollectionStrat.factorListBis,$outputData.file_name,$log.file_name)
53 #end if
54 #else:
55 #set $ret_code=$general_functions.generateFactorFile($inputCondition.inputData,$inputCondition.factorList,$outputData.file_name,$log.file_name)
56 #end if
23 57
24 if [ $ret_code != 0 ]; then 58 if [ $ret_code != 0 ]; then
25 printf "[ERROR]Error during factor file generation\n" >> $log; 59 printf "[ERROR]Error during factor file generation\n" >> $log;
26 exit $ret_code; 60 exit $ret_code;
27 fi; 61 fi;
33 <param type="text" name="title" value="ConditionsGenerator_toPersonalize" label="Title for output"/> 67 <param type="text" name="title" value="ConditionsGenerator_toPersonalize" label="Title for output"/>
34 68
35 <conditional name="inputCondition"> 69 <conditional name="inputCondition">
36 <param name="selection" type="select" label="Input data type for sample names" force_select="true"> 70 <param name="selection" type="select" label="Input data type for sample names" force_select="true">
37 <option value="normalizedData">Expression tabular file</option> 71 <option value="normalizedData">Expression tabular file</option>
38 <option value="CELcollection">.CEL files</option> 72 <option value="CELfiles">.CEL files</option>
73 <option value="CELcollection">.CEL file collection</option>
39 </param> 74 </param>
40 <when value="normalizedData"> 75 <when value="normalizedData">
41 <param type="data" name="inputData" format="tabular" label="Select file" optional="false" multiple="false"/> 76 <param type="data" name="inputData" format="tabular" label="Select a single dataset" optional="false" multiple="false"/>
77
78 <repeat name="factorList" title="Factor">
79 <param type="text" name="factorName" value="" label="Factor name"/>
80 <repeat name="valueList" title="Value">
81 <param type="text" name="valueName" value="" label="Value name"/>
82 <param name="valueConditions" type="select" optional="false" multiple="true" label="Select sample sharing this value"
83 refresh_on_change="true" dynamic_options="get_condition_file_names(inputCondition['inputData'],0)">
84 </param>
85 </repeat>
86 </repeat>
87
88 </when>
89 <when value="CELfiles">
90 <param type="data" name="inputData" format="cel" label="Select multiple files" optional="false" multiple="true">
91 <validator type="empty_field" message="At least two data files should be selected"></validator>
92 </param>
93
94 <repeat name="factorList" title="Factor">
95 <param type="text" name="factorName" value="" label="Factor name"/>
96 <repeat name="valueList" title="Value">
97 <param type="text" name="valueName" value="" label="Value name"/>
98 <param name="valueConditions" type="select" optional="false" multiple="true" label="Select sample sharing this value"
99 refresh_on_change="true" dynamic_options="get_condition_file_names(inputCondition['inputData'])">
100 </param>
101 </repeat>
102 </repeat>
103
42 </when> 104 </when>
43 <when value="CELcollection"> 105 <when value="CELcollection">
44 <param type="data" name="inputData" format="cel" label="Select files" optional="false" multiple="true"> 106 <param type="data_collection" name="inputData" format="cel" label="Select a single dataset collection" optional="false" multiple="true">
45 <validator type="empty_dataset" message="At least one data file should be selected"></validator> 107 <validator type="empty_field" message="One data collection should be selected"></validator>
46 </param> 108 </param>
109
110 <conditional name="selectCollectionStrat">
111 <param name="how" type="select" label="Select how .CEL files will be assigned to factor values">
112 <option value="individualSelection">Select individually each .CEL file from the collection</option>
113 <option value="group_tags">Use associated .CEL file tags</option>
114 </param>
115 <when value="individualSelection">
116
117 <repeat name="factorListBis" title="Factor">
118 <param type="text" name="factorName" value="" label="Factor name"/>
119 <repeat name="valueList" title="Value">
120 <param type="text" name="valueName" value="" label="Value name"/>
121 <param name="valueConditions" type="select" optional="false" multiple="true" label="Select sample sharing this value"
122 refresh_on_change="true" dynamic_options="get_condition_file_names(inputCondition['inputData'])">
123 </param>
124 </repeat>
125 </repeat>
126
127 </when>
128 <when value="group_tags">
129
130 <repeat name="factorListBis" title="Factor">
131 <param type="text" name="factorName" value="" label="Factor name"/>
132 <repeat name="valueList" title="Value">
133 <param type="text" name="valueName" value="" label="Value name"/>
134 <param name="valueConditions" type="group_tag" data_ref="inputData" multiple="true" label="Select groups sharing this value"/>
135 </repeat>
136 </repeat>
137
138 </when>
139 </conditional>
47 </when> 140 </when>
48 </conditional> 141 </conditional>
49
50 <section name="factorsSection" title="Factor definition" expanded="True">
51 <repeat name="factorList" title="Factor">
52 <param type="text" name="factorName" value="" label="Factor name"/>
53 <repeat name="valueList" title="Value">
54 <param type="text" name="valueName" value="" label="Value name"/>
55 <param name="valueConditions" type="select" optional="false" multiple="true" label="Select sample sharing this value"
56 refresh_on_change="true" dynamic_options="get_condition_file_names(inputCondition['inputData'])">
57 </param>
58 </repeat>
59 </repeat>
60 </section>
61
62 </inputs> 142 </inputs>
63 143
64 <outputs> 144 <outputs>
65 <data format="tabular" name="outputData" label="${title}_conditionsFile"/> 145 <data format="tabular" name="outputData" label="${title}_conditionsFile"/>
66
67 <data format="txt" name="log" label="${title}_Log" /> 146 <data format="txt" name="log" label="${title}_Log" />
68 </outputs> 147 </outputs>
69 148
149
150
70 <tests> 151 <tests>
71 <test maxseconds="3600"> 152 <test maxseconds="3600">
72 <param name="wfile" value="wiggle.wig" /> 153 <conditional name="inputCondition">
73 <param name="bfile" value="bedfile.bed" /> 154 <param name="selection" value="normalizedData" />
74 <param name="span" value="3000" /> 155 <param name="inputData" value="./NormalizedData.tabular" />
75 <param name="pfres" value="50" /> 156 <repeat name="factorList">
76 <param name="lowersize" value="1000" /> 157 <param name="factorName" value="Strain" />
77 <param name="middlesize" value="2000" /> 158 <repeat name="valueList">
78 <param name="uppersize" value="3000" /> 159 <param name="valueName" value="WT" />
79 <param name="lowerbisize" value="2500" /> 160 <param name="valueConditions" value="GSM205769.CEL,GSM205772.CEL,GSM205768.CEL,GSM205767.CEL,GSM205766.CEL,GSM205771.CEL,GSM205770.CEL"/>
80 <param name="upperbisize" value="5000" /> 161 </repeat>
81 <param name="reldist" value="3000" /> 162 <repeat name="valueList">
82 <param name="genome" value="hg18" /> 163 <param name="valueName" value="KO" />
83 <param name="imagetype" value="PDF" /> 164 <param name="valueConditions" value="GSM205777.CEL,GSM205776.CEL,GSM205781.CEL,GSM205773.CEL,GSM205780.CEL,GSM205779.CEL,GSM205782.CEL,GSM205775.CEL,GSM205774.CEL,GSM205778.CEL"/>
84 <param name="enable" value="no" /> 165 </repeat>
85 <output name="outputData" file="ceas_1/ceas_1.pdf" /> 166 </repeat>
167 <repeat name="factorList">
168 <param name="factorName" value="Treatment" />
169 <repeat name="valueList">
170 <param name="valueName" value="Control" />
171 <param name="valueConditions" value="GSM205777.CEL,GSM205776.CEL,GSM205773.CEL,GSM205775.CEL,GSM205774.CEL,GSM205768.CEL,GSM205767.CEL,GSM205766.CEL"/>
172 </repeat>
173 <repeat name="valueList">
174 <param name="valueName" value="Treat" />
175 <param name="valueConditions" value="GSM205781.CEL,GSM205769.CEL,GSM205772.CEL,GSM205780.CEL,GSM205779.CEL,GSM205782.CEL,GSM205778.CEL,GSM205771.CEL,GSM205770.CEL"/>
176 </repeat>
177 </repeat>
178 </conditional>
179 <output name="outputData" file="./FactorFileGenerator/output/conditionsFile.csv" />
180 <output name="log" file="./FactorFileGenerator/output/outputLog.txt" />
86 </test> 181 </test>
87 </tests> 182 </tests>
183
184
185
88 <help> 186 <help>
89 <![CDATA[ 187 <![CDATA[
90 **What it does ?** 188 **What it does ?**
91 189
92 This tool generates factor information file used by other tools of GIANT tool suite. 190 This tool generates factor information file used by other tools of GIANT tool suite.
109 OR4F5 3.737956 3.011586 3.424494 3.497545 207 OR4F5 3.737956 3.011586 3.424494 3.497545
110 VWA1 5.189621 5.129595 4.806793 5.227014 208 VWA1 5.189621 5.129595 4.806793 5.227014
111 209
112 OR 210 OR
113 211
114 - **.CEL files** of your study (you should select multiple .CEL files or unique collection file). 212 - **.CEL files** of your study (you should select multiple .CEL files).
213
214 OR
215
216 - **.CEL file collection** of your study (you should select a unique collection file).
217
218 \- **Individual selection** of files to associate to factor values.
219
220 or
221
222 \- **Tag selection** to associate samples sharing the same tag to factor values.
115 223
116 \- **Factor definition** 224 \- **Factor definition**
117 225
118 - **Factor name** to discriminate between samples as 'Treatments', 'Year', 'Strain' (please avoid special characters) 226 - **Factor name** to discriminate between samples as 'Treatments', 'Year', 'Strain' (please avoid special characters)
119 227
120 - **Value name** of different states for the current factor as 'KO' or 'WT' for 'Strain' factor (please avoid special characters) 228 - **Value name** of different states for the current factor as 'KO' or 'WT' for 'Strain' factor (please avoid special characters)
121 229
122 - **Select sample** to assign to current value 230 - **Select sample/tag** to assign to current value
123 231
124 ----- 232 -----
125 233
126 **Outputs** 234 **Outputs**
127 235
137 245
138 - **LOG file** for job log. If you see errors, please attached this in the bug report 246 - **LOG file** for job log. If you see errors, please attached this in the bug report
139 247
140 ]]> </help> 248 ]]> </help>
141 249
142 <citations>
143 </citations>
144
145 </tool> 250 </tool>