Hi Shaun, The Cheetah 2 syntax is a bit stricter. The problem here is the colon. These should become: #if $input_type.in_source == "user" #rand2_seq.pl ... #else #rand2_seq.pl ... #end if# The final hash after 'end if' is not explicitly required but is proper syntax and would allow you to put more arguments after the conditional. --nate SHAUN WEBB wrote:
Hi, Since updating Galaxy I am having issues running some of the tools I have created.
The problem is with if statements in the code (I believe it is Cheetah) within the <command> tab.
This is an example: #if $input_type.in_source == "user": #rand2_seq.pl --in $in --cutsites $cutsites --out $out --length $length #else: #rand2_seq.pl --in $in --out $out --length $length #end if
I am receiving the following error:
File "/opt/galaxy_dist/eggs/py2.5-linux-x86_64-ucs4/Cheetah-2.2.2-py2.5-linux-x86_64.egg/Cheetah/Parser.py", line 2645, in popFromOpenDirectivesStack raise ParseError(self, msg="#end found, but nothing to end") ParseError:
#end found, but nothing to end Line 4, column 1
Line|Cheetah Code ----|------------------------------------------------------------- 2 | #else: #rand2_seq.pl --in $in --out $out --length $length 3 | #end if 4 | ^
I am guessing there has been some sort of update to the way these scripts are compiled as they worked fine before.
Thanks for your help
Shaun Webb