Add code_file example tool from Bjoern.

This commit is contained in:
John Chilton
2014-12-15 14:37:22 -05:00
parent deb6cdd36a
commit 82e117fadd
3 changed files with 30 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
from galaxy.tools.parameters import DataToolParameter
def validate_input( trans, error_map, param_values, page_param_map ):
"""
Validates the user input, before execution.
"""
first = param_values['name1']
second = param_values['name2']
if first == second:
error_map['name1'] = "The value names should be different."
+15
View File
@@ -0,0 +1,15 @@
<tool id="code_file" name="code_file" version="1.0.0">
<description>code_file</description>
<code file="code_file.py" />
<command>cat $input1 > $output</command>
<inputs>
<param name="input1" type="data" label="Concatenate Dataset" />
<param name="name1" type="text" value="FactorName" label="value one should be different than value two" />
<param name="name2" type="text" value="FactorName" label="value one should be different than value two" />
</inputs>
<outputs>
<data format="txt" name="output" />
</outputs>
<tests>
</tests>
</tool>
@@ -3,6 +3,7 @@
<tool file="upload.xml"/>
<tool file="simple_constructs.xml" />
<tool file="composite.xml" />
<tool file="code_file.xml" />
<tool file="disambiguate_cond.xml" />
<tool file="multi_repeats.xml"/>
<tool file="multi_page.xml"/>