Mercurial > repos > mingchen0919 > elastic_sra_toolkit
comparison elastic_tool.xml @ 0:6259ffa3d2d3 draft
planemo upload
| author | mingchen0919 |
|---|---|
| date | Sun, 01 Apr 2018 23:41:44 -0400 |
| parents | |
| children | 58c172729fd3 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:6259ffa3d2d3 |
|---|---|
| 1 <tool id="elastic_fastq_dump" name="elastic fastq-dump" version="1.0.0"> | |
| 2 <macros> | |
| 3 <import>elastic_tool_macros.xml</import> | |
| 4 </macros> | |
| 5 <expand macro="tool_description"/> | |
| 6 <requirements> | |
| 7 <expand macro="tool_requirements"/> | |
| 8 </requirements> | |
| 9 <stdio> | |
| 10 <regex match="XXX" source="stderr" level="warning" | |
| 11 description="Check the tool log output file for more details."/> | |
| 12 </stdio> | |
| 13 <command><![CDATA[ | |
| 14 | |
| 15 ############ first, create a directory to store all files | |
| 16 mkdir -p $report.files_path && | |
| 17 | |
| 18 | |
| 19 ############ save the tool installation directory to an environment variable | |
| 20 export TOOL_INSTALL_DIR='${__tool_directory__}' && | |
| 21 | |
| 22 | |
| 23 ######################### | |
| 24 ## | |
| 25 ## save user input option/argument pairs into a file | |
| 26 ## | |
| 27 ######################### | |
| 28 | |
| 29 ## first line will be the header | |
| 30 echo 'type|option|value|path_type' > $report.files_path/options_and_arguments.txt && | |
| 31 | |
| 32 ############ tool_name | |
| 33 ##-t '$tool_name' | |
| 34 echo "tool_name|not available|${tool_name}|not available" >> $report.files_path/options_and_arguments.txt && | |
| 35 | |
| 36 #################################################### | |
| 37 ## loop through repeats to get option/argument pairs | |
| 38 #################################################### | |
| 39 | |
| 40 ############ option_argument_single_dataset | |
| 41 #for i in $option_argument_single_dataset_repeat: | |
| 42 #set $item = 'single_dataset|' + str($i.option) + "|" + str($i.value) + "|" | |
| 43 echo '$item' >> $report.files_path/options_and_arguments.txt && | |
| 44 #end for | |
| 45 | |
| 46 ############ option_argument_multiple_datasets | |
| 47 #for i in $option_argument_multiple_datasets_repeat: | |
| 48 #set $item = 'multiple_datasets|' + str($i.option) + "|" + str($i.value).replace(',', str($i.delimiter)) + "|" | |
| 49 echo '$item' >> $report.files_path/options_and_arguments.txt && | |
| 50 #end for | |
| 51 | |
| 52 | |
| 53 ############ option_argument_path_relative_to_other_tool | |
| 54 #for i in $option_argument_path_relative_to_other_tool_repeat: | |
| 55 #set $item = 'path_relative_to_a_tool|' + str($i.option) + "|" + str($i.value) + "|" + str($i.a_tool_output_dir) | |
| 56 echo '$item' >> $report.files_path/options_and_arguments.txt && | |
| 57 #end for | |
| 58 | |
| 59 ############ option_argument_path_relative_to_this_tool | |
| 60 #for i in $option_argument_path_relative_to_this_tool_repeat: | |
| 61 #set $item = 'path_relative_to_this_tool|' + str($i.option) + "|" + $report.files_path + '/' + str($i.value) + "|" + str($i.path_type) | |
| 62 echo '$item' >> $report.files_path/options_and_arguments.txt && | |
| 63 #end for | |
| 64 | |
| 65 ############ option_argument_string_float_integer | |
| 66 #for i in $option_argument_string_float_integer_repeat: | |
| 67 #set $item = 'value|' + str($i.option) + "|" + str($i.value) + "|" | |
| 68 echo '$item' >> $report.files_path/options_and_arguments.txt && | |
| 69 #end for | |
| 70 | |
| 71 ############ output_set | |
| 72 ## '$report' | |
| 73 ## '$report.files_path' | |
| 74 ## '$tool_output_dir' | |
| 75 ## '$tool_log' | |
| 76 ####################### | |
| 77 export REPORT='$report' && | |
| 78 export REPORT_FILES_PATH='$report.files_path' && | |
| 79 export TOOL_OUTPUT_DIR='$tool_output_dir' && | |
| 80 export TOOL_LOG='$tool_log' && | |
| 81 | |
| 82 | |
| 83 ############ run render R script to render R markdowns | |
| 84 Rscript '${__tool_directory__}/elastic_tool_render.R' | |
| 85 | |
| 86 ]]></command> | |
| 87 <inputs> | |
| 88 <param type="select" name="tool_name" multiple="false" label="Tool name"> | |
| 89 <expand macro="tool_options"/> | |
| 90 </param> | |
| 91 <repeat name="option_argument_single_dataset_repeat" title="DATA FROM HISTORY: single data set" min="0" | |
| 92 default="0"> | |
| 93 <param type="text" name="option" optional="true" label="option"/> | |
| 94 <param name="value" type="data" optional="false" multiple="false" label="value"/> | |
| 95 </repeat> | |
| 96 <repeat name="option_argument_multiple_datasets_repeat" title="DATA FROM HISTORY: multiple data sets" | |
| 97 min="0" default="0"> | |
| 98 <param type="text" name="option" optional="true" label="option"/> | |
| 99 <param name="value" type="data" optional="false" multiple="true" label="value"/> | |
| 100 <param type="select" name="delimiter" multiple="false" label="file delimiter"> | |
| 101 <option value=" " selected="false">space</option> | |
| 102 <option value="," selected="false">comma</option> | |
| 103 </param> | |
| 104 </repeat> | |
| 105 <repeat name="option_argument_path_relative_to_other_tool_repeat" | |
| 106 title="PATH: relative to other tool output directory" min="0" default="0"> | |
| 107 <param type="text" name="option" optional="true" label="option"/> | |
| 108 <param name="a_tool_output_dir" type="data" optional="false" multiple="false" | |
| 109 label="a tool output directory"/> | |
| 110 <param type="text" name="value" optional="true" label="value"/> | |
| 111 </repeat> | |
| 112 <repeat name="option_argument_path_relative_to_this_tool_repeat" | |
| 113 title="PATH: relative to this tool output directory" min="0" default="0"> | |
| 114 <param type="text" name="option" optional="true" label="option"/> | |
| 115 <param type="text" name="value" optional="false" label="value"/> | |
| 116 <param type="select" name="path_type" multiple="false" label="path type"> | |
| 117 <option value="file_path" selected="false">file path</option> | |
| 118 <option value="dir_path" selected="false">directory path</option> | |
| 119 </param> | |
| 120 </repeat> | |
| 121 <repeat name="option_argument_string_float_integer_repeat" title="INPUT VALUE: string/float/integer" min="0" | |
| 122 default="0"> | |
| 123 <param type="text" name="option" label="option"/> | |
| 124 <param type="text" name="value" label="value"/> | |
| 125 </repeat> | |
| 126 </inputs> | |
| 127 <outputs> | |
| 128 <data format="html" name="report" label="${tool.name} report ${on_string}"/> | |
| 129 <data format="txt" name="tool_output_dir" label="${tool.name} output directory ${on_string}"/> | |
| 130 <data format="txt" name="tool_log" label="${tool.name} log ${on_string}"/> | |
| 131 </outputs> | |
| 132 <expand macro="tool_help" /> | |
| 133 <citations> | |
| 134 <expand macro="citations"/> | |
| 135 </citations> | |
| 136 </tool> |
