Re: [galaxy-dev] Syntax issue for adding new tool

2012-02-07 Thread Louise-Amélie Schmitt

Hello,

I'm not sure this will fix the issue but you might have to use
-p $param_file.params
instead of
-p $params
in your command line.

Best,
L-A


Le 06/02/2012 22:15, Jeffrey Long a écrit :

Hi all,
I am having trouble with what looked to me at first to be a "simple" 
syntactical issue with writing the XML wrapper for a new Galaxy tool. 
 I had thought this would be easy, but perhaps I am missing something 
incredibly simple, as I am having no success at all.  The relevant 
parts look something like this:



mycommand.sh
-i $input
#if $param_file.use_params == "true"#
-p $params
#end if





Yes
No


value=""/>





It's very simple, I just want the line "-p $params" to appear in the 
command line when the parameter "use_params" parameter is set to true.


However, when building the command line statement to run, I get this 
error:


--
Traceback (most recent call last):
  File 
"/Users/jrl909/Galaxy/galaxy-dist/lib/galaxy/jobs/runners/local.py", 
line 59, in run_job

job_wrapper.prepare()
  File "/Users/jrl909/Galaxy/galaxy-dist/lib/galaxy/jobs/__init__.py", 
line 424, in prepare

self.command_line = self.tool.build_command_line( param_dict )
  File 
"/Users/jrl909/Galaxy/galaxy-dist/lib/galaxy/tools/__init__.py", line 
1827, in build_command_line

command_line = fill_template( self.command, context=param_dict )
  File "/Users/jrl909/Galaxy/galaxy-dist/lib/galaxy/util/template.py", 
line 9, in fill_template

return str( Template( source=template_text, searchList=[context] ) )
  File 
"/Users/jrl909/Galaxy/galaxy-dist/eggs/Cheetah-2.2.2-py2.7-macosx-10.6-intel-ucs2.egg/Cheetah/Template.py", 
line 1004, in __str__

return getattr(self, mainMethName)()
  File 
"cheetah_DynamicallyCompiledCheetahTemplate_1328561167_73_97196.py", 
line 84, in respond
NotFound: cannot find 'use_params' while searching for 
'param_file.use_params'

michael
---

As far as I can tell, the syntax I've used here is the same as that 
found in the example file suggested by the Galaxy documentation: 
interval2maf.xml  (what I see as the "relevant" sections being 
reproduced below):


---



#if $maf_source_type.maf_source == "user" #interval2maf.py 
--dbkey=${input1.dbkey} --chromCol=${input1.metadata.chromCol} 
--startCol=${input1.metadata.startCol} 
--endCol=${input1.metadata.endCol} 
--strandCol=${input1.metadata.strandCol} 
--mafFile=$maf_source_type.mafFile 
--mafIndex=$maf_source_type.mafFile.metadata.maf_index 
--interval_file=$input1 --output_file=$out_file1 
--mafIndexFile=${GALAXY_DATA_INDEX_DIR}/maf_index.loc 
--species=$maf_source_type.species


#else #interval2maf.py 
--dbkey=${input1.dbkey} --chromCol=${input1.metadata.chromCol} 
--startCol=${input1.metadata.startCol} 
--endCol=${input1.metadata.endCol} 
--strandCol=${input1.metadata.strandCol} 
--mafType=$maf_source_type.mafType --interval_file=$input1 
--output_file=$out_file1 
--mafIndexFile=${GALAXY_DATA_INDEX_DIR}/maf_index.loc 
--species=$maf_source_type.species


#end if# 
--split_blocks_by_species=$split_blocks_by_species_selector.split_blocks_by_species


#if $split_blocks_by_species_selector.split_blocks_by_species == 
"split_blocks_by_species"#



--remove_all_gap_columns=$split_blocks_by_species_selector.remove_all_gap_columns


#end if





...

blahblahblah

...






Split by species

Do not 
split















Collapse empty 
columns


Do not collapse











---
As you can see, the field 'split_blocks_by_species' is referenced in 
an #if-block in the command specification the same way my 'use_params' 
field is.


I would like very much to know the apparently crucial difference that 
I'm missing!


Thanks,
-Jeff




___
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

   http://lists.bx.psu.edu/


___
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/

[galaxy-dev] Syntax issue for adding new tool

2012-02-06 Thread Jeffrey Long
Hi all,
I am having trouble with what looked to me at first to be a "simple"
syntactical issue with writing the XML wrapper for a new Galaxy tool.  I
had thought this would be easy, but perhaps I am missing something
incredibly simple, as I am having no success at all.  The relevant parts
look something like this:


  mycommand.sh
-i $input
  #if $param_file.use_params == "true"#
  -p $params
  #end if
  
  
  
  
  
  Yes
  No
  
  
  
  
  

  

It's very simple, I just want the line "-p $params" to appear in the
command line when the parameter "use_params" parameter is set to true.

However, when building the command line statement to run, I get this error:

--
Traceback (most recent call last):
  File "/Users/jrl909/Galaxy/galaxy-dist/lib/galaxy/jobs/runners/local.py",
line 59, in run_job
job_wrapper.prepare()
  File "/Users/jrl909/Galaxy/galaxy-dist/lib/galaxy/jobs/__init__.py", line
424, in prepare
self.command_line = self.tool.build_command_line( param_dict )
  File "/Users/jrl909/Galaxy/galaxy-dist/lib/galaxy/tools/__init__.py",
line 1827, in build_command_line
command_line = fill_template( self.command, context=param_dict )
  File "/Users/jrl909/Galaxy/galaxy-dist/lib/galaxy/util/template.py", line
9, in fill_template
return str( Template( source=template_text, searchList=[context] ) )
  File
"/Users/jrl909/Galaxy/galaxy-dist/eggs/Cheetah-2.2.2-py2.7-macosx-10.6-intel-ucs2.egg/Cheetah/Template.py",
line 1004, in __str__
return getattr(self, mainMethName)()
  File "cheetah_DynamicallyCompiledCheetahTemplate_1328561167_73_97196.py",
line 84, in respond
NotFound: cannot find 'use_params' while searching for
'param_file.use_params'

---

As far as I can tell, the syntax I've used here is the same as that found
in the example file suggested by the Galaxy documentation: interval2maf.xml
 (what I see as the "relevant" sections being reproduced below):

---



#if $maf_source_type.maf_source == "user" #interval2maf.py
--dbkey=${input1.dbkey} --chromCol=${input1.metadata.chromCol}
--startCol=${input1.metadata.startCol} --endCol=${input1.metadata.endCol}
--strandCol=${input1.metadata.strandCol} --mafFile=$maf_source_type.mafFile
--mafIndex=$maf_source_type.mafFile.metadata.maf_index
--interval_file=$input1 --output_file=$out_file1
--mafIndexFile=${GALAXY_DATA_INDEX_DIR}/maf_index.loc
--species=$maf_source_type.species

#else #interval2maf.py
--dbkey=${input1.dbkey} --chromCol=${input1.metadata.chromCol}
--startCol=${input1.metadata.startCol} --endCol=${input1.metadata.endCol}
--strandCol=${input1.metadata.strandCol} --mafType=$maf_source_type.mafType
--interval_file=$input1 --output_file=$out_file1
--mafIndexFile=${GALAXY_DATA_INDEX_DIR}/maf_index.loc
--species=$maf_source_type.species

#end if#
--split_blocks_by_species=$split_blocks_by_species_selector.split_blocks_by_species

#if $split_blocks_by_species_selector.split_blocks_by_species ==
"split_blocks_by_species"#


--remove_all_gap_columns=$split_blocks_by_species_selector.remove_all_gap_columns

#end if

  

  

...

blahblahblah

...



  

Split by species

Do not
split

  

  



  

  



  Collapse
empty columns

  Do not collapse



  



   



---
As you can see, the field 'split_blocks_by_species' is referenced in an
#if-block in the command specification the same way my 'use_params' field
is.

I would like very much to know the apparently crucial difference that I'm
missing!

Thanks,
-Jeff
___
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/