Skip to content

Instantly share code, notes, and snippets.

@jkgoya
Created September 15, 2012 00:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkgoya/3725751 to your computer and use it in GitHub Desktop.
Save jkgoya/3725751 to your computer and use it in GitHub Desktop.
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