Mercurial > repos > fubar > brokenandnotdeletablebyowneroradmin
comparison rgToolFactory.xml @ 9:e09c76551bed
Can run without input or output or either..
random heatmap (no inputs) example added to docs
| author | ross lazarus ross.lazarus@gmail.com |
|---|---|
| date | Sat, 02 Jun 2012 21:08:57 +1000 |
| parents | 220885b2d7ee |
| children | 71f2ac0eee95 |
comparison
equal
deleted
inserted
replaced
| 8:220885b2d7ee | 9:e09c76551bed |
|---|---|
| 3 <command interpreter="python"> | 3 <command interpreter="python"> |
| 4 #if ( $__user_email__ not in ['ross.lazarus@gmail.com',] ): | 4 #if ( $__user_email__ not in ['ross.lazarus@gmail.com',] ): |
| 5 rgToolFactory.py --bad_user $__user_email__ | 5 rgToolFactory.py --bad_user $__user_email__ |
| 6 #else: | 6 #else: |
| 7 rgToolFactory.py --script_path "$runme" --interpreter "$interpreter" | 7 rgToolFactory.py --script_path "$runme" --interpreter "$interpreter" |
| 8 --tool_name "$tool_name" --input_tab "$input1" | 8 --tool_name "$tool_name" |
| 9 #if $make_HTML.value=="yes" or $factory.make_Tool=="yes": | 9 #if $make_HTML.value=="yes" or $factory.make_Tool=="yes": |
| 10 --output_dir "$html_file.files_path" --output_html "$html_file" | 10 --output_dir "$html_file.files_path" --output_html "$html_file" |
| 11 #end if | |
| 12 #if $input1.value != 'None': | |
| 13 --input_tab "$input1" | |
| 11 #end if | 14 #end if |
| 12 #if $make_HTML.value=="yes": | 15 #if $make_HTML.value=="yes": |
| 13 --make_HTML "yes" | 16 --make_HTML "yes" |
| 14 #end if | 17 #end if |
| 15 #if $make_TAB.value=="yes": | 18 #if $make_TAB.value=="yes": |
| 76 </outputs> | 79 </outputs> |
| 77 <configfiles> | 80 <configfiles> |
| 78 <configfile name="runme"> | 81 <configfile name="runme"> |
| 79 ${dynScript} | 82 ${dynScript} |
| 80 </configfile> | 83 </configfile> |
| 84 | |
| 85 <configfile name="helpme"> | |
| 81 #if $factory.make_Tool == "yes": | 86 #if $factory.make_Tool == "yes": |
| 82 <configfile name="helpme"> | |
| 83 $factory.help_text | 87 $factory.help_text |
| 88 #end if | |
| 84 </configfile> | 89 </configfile> |
| 85 #end if | |
| 86 | |
| 87 </configfiles> | 90 </configfiles> |
| 88 <help> | 91 <help> |
| 89 **What it does** | 92 **What it does** |
| 90 This tool enables a user to paste and submit an arbitrary R/python/perl script to run in Galaxy. | 93 This tool enables a user to paste and submit an arbitrary R/python/perl script to run in Galaxy. |
| 91 This is (extremely) insecure. | 94 This is (extremely) insecure. However, once you get the script working on some test data, you can generate a complete ready to run |
| 95 Galaxy tool by setting the "Make tool" option to Yes. The resulting tarball will be ready to install | |
| 96 It will run like as securely as any other Galaxy tool - unlike this one used to generate it. | |
| 92 | 97 |
| 93 **Restrictions** | 98 **Restrictions** |
| 94 This tool will ONLY work if your user id has been added to the local copy's list of permitted users. | 99 This tool will ONLY work if your user id has been added to the local copy's list of permitted users. |
| 95 Ask your friendly Galaxy administrator to edit this tool's source for you if you need this. | 100 It should only ever be used on a private, personal Galaxy instance and you should edit this tool's source so your local login |
| 101 is authorised to use it - == it will not run otherwise == | |
| 96 | 102 |
| 97 **Note to system administrators** | 103 **Note to system administrators** |
| 98 Under no circumstances should you allow any user to use this tool unless you really, really trust them to do | 104 Under no circumstances should you allow any user to use this tool unless you really, really trust them to do |
| 99 no harm. | 105 no harm. |
| 100 | 106 |
| 120 outf = ourargs[2] | 126 outf = ourargs[2] |
| 121 inp = read.table(inf,head=F,row.names=NULL,sep='\t') | 127 inp = read.table(inf,head=F,row.names=NULL,sep='\t') |
| 122 outp = t(inp) | 128 outp = t(inp) |
| 123 write.table(outp,outf, quote=FALSE, sep="\t",row.names=F,col.names=F) | 129 write.table(outp,outf, quote=FALSE, sep="\t",row.names=F,col.names=F) |
| 124 | 130 |
| 131 A more complex example takes no input file but generates a random heatmap pdf - you must make sure the option to create an HTML output file is | |
| 132 turned on for this to work. The heatmap will be presented as a thumbnail linked to the pdf in the resulting HTML page:: | |
| 133 | |
| 134 foo = data.frame(a=runif(100),b=runif(100),c=runif(100),d=runif(100),e=runif(100),f=runif(100)) | |
| 135 bar = as.matrix(foo) | |
| 136 pdf( "heattest.pdf" ) | |
| 137 heatmap(bar,main='Random Heatmap') | |
| 138 dev.off() | |
| 139 | |
| 140 | |
| 125 </help> | 141 </help> |
| 126 | 142 |
| 127 </tool> | 143 </tool> |
| 128 | 144 |
| 129 | 145 |
