input and output extensions
Hi, 1. INPUT I am trying to make a simple tool that sends a command to run crimap without a wrapper ie. ............. <command> crimap $param_file $option >$output1 </command> .............. However, crimap expects a .par file as input (ie. $param_file should be a .par file). Because of this I get the error: ERROR: Parameter file '/home/galaxy/galaxy-dist/database/job_working_directory/001/1434/tmpe5hErw' does not have '.par' suffix Is there a simple way around this (using more lines in the command)? If I need to create a wrapper script, does somebody have an example that could help me to understand how it should be created? I am not familiar with python or perl and have written my other tools with R scripts embedded in the xml file ie. <command interpreter="sh">r_wrapper.sh $script_file</command> <configfiles> <configfile name="script_file"> etc etc </configfile> </configfiles> 2. OUTPUT This is a similar issue. This time I am trying to run another program called "crigen" without a wrapper as follows: ................ <command> crigen -g $myData_gen -o $crimap_number -size $num_individ -gen $num_gen >$output1 </command> <inputs> <param name="label" type="text" value="name" size="30" label="short title for run"> </param> <param format="tabular" name="myData_gen" type="data" label="Choose .gen file" help="" > </param> <param name="crimap_number" type="integer" value="1" min="1" max="100000" label="number to identify output"> </param> <param name="num_individ" type="integer" value="50" min="1" max="10000" label="Number of individuals per family" help="limit of 1 to 10000"> </param> <param name="num_gen" type="integer" value="3" min="1" max="20" label="Number of generations" help="limit of 1 to 20"> </param> </inputs> <outputs> <data format="tabular" name="output1" label="crigen output ${label}" /> </outputs> In this case you need to use a number to identify the output in crigen. Running the tool is successful, but I get an empty output. Appreciate any wrapper examples that deal with this sort of requirement too. Thanks and cheers, Nick
On Fri, Jun 8, 2012 at 9:15 AM, Nicholas Robinson <nicholas.robinson@nofima.no> wrote:
Hi,
1. INPUT I am trying to make a simple tool that sends a command to run crimap without a wrapper ie. ............. <command> crimap $param_file $option >$output1 </command> ..............
However, crimap expects a .par file as input (ie. $param_file should be a .par file). Because of this I get the error: ERROR: Parameter file '/home/galaxy/galaxy-dist/database/job_working_directory/001/1434/tmpe5hErw' does not have '.par' suffix
...
Is there a simple way around this (using more lines in the command)?
You could try something like this (untested): <command> ln -s $param_file $param_file.par; crimap $param_file $option >$output1 </command> The idea here is to tell Galaxy to issue two commands, the first a shell call to create a symlink with the desired extension pointing at the input filename from Galaxy. i.e. If $param_file was /path/to/file/dataset_123.dat you'd make a symlink /path/to/file/dataset_123.dat.par - but check if you need to remove the symlink afterwards. Anything more that that and I would use a wrapper script in whatever you are most comfortable with (e.g. shell, Perl, or Python). e.g. <command> my_script $param_file $option $output1 </command> where the my_script file is marked executable with a hashbang (or set the interpreter in the command tag), and the script could be just: #/bin/bash ln -s $param_file $param_file.par crimap $param_file $option > $output1 rm $param_file.par Peter
participants (2)
-
Nicholas Robinson
-
Peter Cock