Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Run arbitrary R scripts in Galaxy
<tool id="rbitrary" name="Rbitrary">
<description>Rbitrary</description>
<command>cat $Rscript | R --slave --args
## Inputs.
${first_input}
#for $input_file in $input_files:
${input_file.additional_input}
#end for
</command>
<inputs>
<param format="txt" name="Rscript" type="data" label="Rscript"/>
<param format="txt" name="first_input" type="data" label="First input file" help=""/>
<repeat name="input_files" title="Additional Input Files">
<param format="txt" name="additional_input" type="data" label="Additional input file" help=""/>
</repeat>
</inputs>
<outputs>
<data format="txt" name="output" label="${tool.name} on ${on_string}" from_work_dir="output.txt"/>
</outputs>
<help>
<!-- Run an arbitrary R script on 1 data file with 1 output.
TODO: allow for multiple inputs and outputs, arbitrary arguments passed to R.
(multiple inputs might work now?)
Add to tool_conf.xml:
<section name="Rbitrary" id="rbitrary">
<tool file="rbitrary/Rbitrary.xml" />
</section>
-->
</help>
</tool>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment