Problem w/Cheetah, repeating dataset input
Hi all, I'm using the following XML: ... <inputs> <param type="data" format="txt" name="seqmeta" label="PAPS.seqmeta"/> <param type="data" format="txt" name="lib_info" label="Label Info"/> <repeat name="to_merge" title="Evaluation Inputs and Results"> <param type="select" name="pmm" label="Mismatch %" help="Maximum % of mismatch between the construct sequence and the comparison sequence."> <option value="10">10%</option> <option value="15">15%</option> <option value="20">20%</option> </param> <param type="text" name="max_length" label="Max Construct Length" value="25" /> <param format="fasta" name="fasta_in" type="data" label="FastA Output"/> <param format="txt" name="seq_stats" type="data" label="Sequence Stats"/> </repeat> </inputs> ... <configfiles> <configfile name="file_info"> #for $merge_set in enumerate( $to_merge ) #silent sys.stderr.write($merge_set.__str__() + "\n") #silent sys.stderr.write($merge_set.fasta_in.__str__()) #end for </configfile> </configfiles> ... And getting the resulting output: 127.0.0.1 - - [07/Apr/2010:15:31:50 -0500] "POST /admin/tool_reload HTTP/1.1" 200 - "http://localhost:8080/admin/reload_tool" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2" 127.0.0.1 - - [07/Apr/2010:15:31:59 -0500] "POST /tool_runner/index HTTP/1.1" 200 - "http://localhost:8080/tool_runner/index" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2" galaxy.jobs.schedulingpolicy.roundrobin DEBUG 2010-04-07 15:32:03,765 RoundRobin queue: user/session did not exist, created new jobqueue for session = 6 galaxy.jobs DEBUG 2010-04-07 15:32:03,766 job 234 put in policy queue galaxy.jobs.schedulingpolicy.roundrobin DEBUG 2010-04-07 15:32:03,766 RoundRobin queue: retrieving job from job queue for session = 6 galaxy.jobs DEBUG 2010-04-07 15:32:03,766 dispatching job 234 to local runner galaxy.jobs DEBUG 2010-04-07 15:32:05,423 job 234 dispatched (0, {'seq_stats': <galaxy.tools.DatasetFilenameWrapper object at 0x572b390>, '__index__': 0, 'max_length': <galaxy.tools.InputValueWrapper object at 0x572b8d0>, 'fasta_in': <galaxy.tools.DatasetFilenameWrapper object at 0x572b810>, 'pmm': <galaxy.tools.SelectToolParameterWrapper object at 0x572b290>}) 127.0.0.1 - - [07/Apr/2010:15:32:03 -0500] "GET /history HTTP/1.1" 200 - "http://localhost:8080/tool_runner/index" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2" galaxy.jobs.runners.local ERROR 2010-04-07 15:32:07,356 failure running job 234 Traceback (most recent call last): File "/Users/jerdmann/Python/galaxy-central/lib/galaxy/jobs/runners/local.py", line 55, in run_job job_wrapper.prepare() File "/Users/jerdmann/Python/galaxy-central/lib/galaxy/jobs/__init__.py", line 386, in prepare config_filenames = self.tool.build_config_files( param_dict, self.working_directory ) File "/Users/jerdmann/Python/galaxy-central/lib/galaxy/tools/__init__.py", line 1364, in build_config_files f.write( fill_template( template_text, context=param_dict ) ) File "/Users/jerdmann/Python/galaxy-central/lib/galaxy/util/template.py", line 9, in fill_template return str( Template( source=template_text, searchList=[context] ) ) File "/Users/jerdmann/Python/galaxy-central/eggs/Cheetah-2.2.2-py2.5-macosx-10.3-fat-ucs2.egg/Cheetah/Template.py", line 1004, in __str__ return getattr(self, mainMethName)() File "cheetah_DynamicallyCompiledCheetahTemplate_1270672326_31_15888.py", line 86, in respond NotFound: cannot find 'fasta_in' while searching for 'merge_set.fasta_in' So, I'm printing the merge_set dictionary and seeing a fasta_in key, but when I try to use fasta_in it can not be found. I'm assuming this is probably a syntax oversight on my part, but I'm not seeing it. -- Jesse Erdmann Bioinformatics Analyst Masonic Cancer Center University of Minnesota jerdmann@umn.edu 612-626-3123 jesse@jesseerdmann.com Twitter: http://twitter.com/jesseerdmann
Hi Jesse, The error is due to the fact that enumerate yields tuples of (counter, item). Change:
#for $merge_set in enumerate( $to_merge )
to: #for $i, $merge_set in enumerate( $to_merge ) or remove the enumerate() call and just iterate over the list if you don't need the index. Let us know if you have further issues. Thanks for using Galaxy, Dan On Apr 7, 2010, at 5:25 PM, Jesse Erdmann wrote:
Hi all,
I'm using the following XML:
... <inputs> <param type="data" format="txt" name="seqmeta" label="PAPS.seqmeta"/> <param type="data" format="txt" name="lib_info" label="Label Info"/> <repeat name="to_merge" title="Evaluation Inputs and Results"> <param type="select" name="pmm" label="Mismatch %" help="Maximum % of mismatch between the construct sequence and the comparison sequence."> <option value="10">10%</option> <option value="15">15%</option> <option value="20">20%</option> </param> <param type="text" name="max_length" label="Max Construct Length" value="25" /> <param format="fasta" name="fasta_in" type="data" label="FastA Output"/> <param format="txt" name="seq_stats" type="data" label="Sequence Stats"/> </repeat> </inputs> ... <configfiles> <configfile name="file_info"> #for $merge_set in enumerate( $to_merge ) #silent sys.stderr.write($merge_set.__str__() + "\n") #silent sys.stderr.write($merge_set.fasta_in.__str__()) #end for </configfile> </configfiles> ...
And getting the resulting output:
127.0.0.1 - - [07/Apr/2010:15:31:50 -0500] "POST /admin/tool_reload HTTP/1.1" 200 - "http://localhost:8080/admin/reload_tool" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2" 127.0.0.1 - - [07/Apr/2010:15:31:59 -0500] "POST /tool_runner/index HTTP/1.1" 200 - "http://localhost:8080/tool_runner/index" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2" galaxy.jobs.schedulingpolicy.roundrobin DEBUG 2010-04-07 15:32:03,765 RoundRobin queue: user/session did not exist, created new jobqueue for session = 6 galaxy.jobs DEBUG 2010-04-07 15:32:03,766 job 234 put in policy queue galaxy.jobs.schedulingpolicy.roundrobin DEBUG 2010-04-07 15:32:03,766 RoundRobin queue: retrieving job from job queue for session = 6 galaxy.jobs DEBUG 2010-04-07 15:32:03,766 dispatching job 234 to local runner galaxy.jobs DEBUG 2010-04-07 15:32:05,423 job 234 dispatched (0, {'seq_stats': <galaxy.tools.DatasetFilenameWrapper object at 0x572b390>, '__index__': 0, 'max_length': <galaxy.tools.InputValueWrapper object at 0x572b8d0>, 'fasta_in': <galaxy.tools.DatasetFilenameWrapper object at 0x572b810>, 'pmm': <galaxy.tools.SelectToolParameterWrapper object at 0x572b290>}) 127.0.0.1 - - [07/Apr/2010:15:32:03 -0500] "GET /history HTTP/1.1" 200 - "http://localhost:8080/tool_runner/index" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2" galaxy.jobs.runners.local ERROR 2010-04-07 15:32:07,356 failure running job 234 Traceback (most recent call last): File "/Users/jerdmann/Python/galaxy-central/lib/galaxy/jobs/runners/local.py", line 55, in run_job job_wrapper.prepare() File "/Users/jerdmann/Python/galaxy-central/lib/galaxy/jobs/__init__.py", line 386, in prepare config_filenames = self.tool.build_config_files( param_dict, self.working_directory ) File "/Users/jerdmann/Python/galaxy-central/lib/galaxy/tools/__init__.py", line 1364, in build_config_files f.write( fill_template( template_text, context=param_dict ) ) File "/Users/jerdmann/Python/galaxy-central/lib/galaxy/util/template.py", line 9, in fill_template return str( Template( source=template_text, searchList=[context] ) ) File "/Users/jerdmann/Python/galaxy-central/eggs/Cheetah-2.2.2-py2.5-macosx-10.3-fat-ucs2.egg/Cheetah/Template.py", line 1004, in __str__ return getattr(self, mainMethName)() File "cheetah_DynamicallyCompiledCheetahTemplate_1270672326_31_15888.py", line 86, in respond NotFound: cannot find 'fasta_in' while searching for 'merge_set.fasta_in'
So, I'm printing the merge_set dictionary and seeing a fasta_in key, but when I try to use fasta_in it can not be found. I'm assuming this is probably a syntax oversight on my part, but I'm not seeing it.
-- Jesse Erdmann Bioinformatics Analyst Masonic Cancer Center University of Minnesota jerdmann@umn.edu 612-626-3123
jesse@jesseerdmann.com Twitter: http://twitter.com/jesseerdmann _______________________________________________ galaxy-user mailing list galaxy-user@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-user
participants (2)
-
Daniel Blankenberg
-
Jesse Erdmann