Fix API handling of tools containing repeat statement with min set.

This commit is contained in:
John Chilton
2013-11-21 20:18:47 -06:00
parent 150b5aa49e
commit 4c4189c558
3 changed files with 29 additions and 0 deletions
+1
View File
@@ -1982,6 +1982,7 @@ class Tool( object, Dictifiable ):
group_errors = [ ]
any_group_errors = False
rep_index = 0
del group_state[:] # Clear prepopulated defaults if repeat.min set.
while True:
rep_name = "%s_%d" % ( key, rep_index )
if not any( [ incoming_key.startswith(rep_name) for incoming_key in incoming.keys() ] ):
+27
View File
@@ -0,0 +1,27 @@
<tool id="min_repeat" name="min_repeat">
<command>
cat #for $q in $queries# ${q.input} #end for# > $out_file1 ;
cat #for $q in $queries2# ${q.input2} #end for# > $out_file2
</command>
<inputs>
<repeat name="queries" title="Dataset" min="1">
<param name="input" type="data" label="Select" />
</repeat>
<repeat name="queries2" title="Dataset" min="1">
<param name="input2" type="data" label="Select" />
</repeat>
</inputs>
<outputs>
<data name="out_file1" format="txt" />
<data name="out_file2" format="txt" />
</outputs>
<tests>
<test>
<param name="input" value="simple_line.txt"/>
<param name="input" value="simple_line.txt"/>
<param name="input2" value="simple_line_alternative.txt"/>
<output name="out_file1" file="simple_line_x2.txt"/>
<output name="out_file2" file="simple_line_alternative.txt"/>
</test>
</tests>
</tool>
@@ -12,4 +12,5 @@
<tool file="metadata.xml" />
<tool file="output_order.xml" />
<tool file="disambiguate_repeats.xml" />
<tool file="min_repeat.xml" />
</toolbox>