Mercurial > repos > brenninc > test_r_cairo_oct1_2015
changeset 24:1c8ae2960409 draft
Uploaded
author | brenninc |
---|---|
date | Fri, 02 Oct 2015 11:46:51 -0400 |
parents | a2cce31a7295 |
children | c5a2fcd1e53d |
files | packages.R r_info.sh r_info.xml tool_dependencies.xml |
diffstat | 4 files changed, 102 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/packages.R Fri Oct 02 11:46:51 2015 -0400 @@ -0,0 +1,22 @@ +library(acepack) +library(colorspace) +library(dichromat) +library(digest) +library(Formula) +library(gtable) +library(labeling) +library(magrittr) +library(proto) +library(Rcpp) +library(RColorBrewer) +library(rjson) +library(snow) +library(SparseM) +library(stringi) +library(stringr) +#library(XML) +library(xtable) + +args<-commandArgs(TRUE) +writeLines(capture.output(sessionInfo()), args[1]) +sessionInfo()
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/r_info.sh Fri Oct 02 11:46:51 2015 -0400 @@ -0,0 +1,30 @@ +#!/bin/sh + + +#Copied from https://github.com/galaxyproject/galaxy/blob/dev/tools/stats/r_wrapper.sh + +### Run R providing the R script in $1 as standard input and passing +### the remaining arguments on the command line + +# Function that writes a message to stderr and exits +fail() +{ + echo "$@" >&2 + exit 1 +} + +# Ensure R executable is found +which R > /dev/null || fail "'R' is required by this tool but was not found on path" + +# Extract first argument +rfile=$1 +package_file=$2 +version_file=$3 + +# Ensure the file exists +test -f $infile || fail "R input file '$infile' does not exist" + +# Invoke R passing file named by first argument to stdin +#Remove --slave for full R output +R --vanilla --slave --args $package_file < $rfile +echo "done"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/r_info.xml Fri Oct 02 11:46:51 2015 -0400 @@ -0,0 +1,30 @@ +<tool id="r_extended_level_one_sessioninfo" name="r_extended_level_one sessionInfo" version="0.1.beta"> + <requirements> + <requirement type="package" version="3.1.2">R</requirement> + <requirement type="package" version="0.0.1">R_extend</requirement> + <!--requirement type="package" version="2.0-0">R_dichroma</requirement--> + </requirements> + <description>Lists packages installed into R</description> + <stdio> + <exit_code range="1" level="fatal" description="Error code 1 occurred" /> + <exit_code range="2:255" level="fatal" description="Unknown error occurred" /> + </stdio> + <command interpreter="bash"> + r_info.sh $__tool_directory__/packages.R $packages + </command> + <outputs> + <data format="txt" name="packages" label="R Session Info"/> + </outputs> + + <tests> + </tests> + + <help> +<![CDATA[ +This is a verification tool to see exactly which R this galaxy server is using. + +It will outout the R version info and the R packages installed. + ]]> + </help> + +</tool>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_dependencies.xml Fri Oct 02 11:46:51 2015 -0400 @@ -0,0 +1,20 @@ +<?xml version="1.0"?> +<tool_dependency> + <package name="R" version="3.1.2"> + <repository toolshed="https://testtoolshed.g2.bx.psu.edu/" name="brenninc_r_sept32105" owner="brenninc" changeset_revision="1d7f08f14e93" prior_installation_required="True" /> + </package> + <package name="R_extend" version="0.0.1"> + <install version="1.0"> + <actions> + <action type="setup_r_environment"> + <repository changeset_revision="1d7f08f14e93" name="brenninc_r_sept32105" owner="brenninc" toolshed="https://testtoolshed.g2.bx.psu.edu/"> + <package name="R" version="3.1.2" /> + </repository> + <package>https://cran.r-project.org/src/contrib/acepack_1.3-3.3.tar.gz</package> + </action> + </actions> + </install> + </package> +</tool_dependency> + +