changeset 12:ffcf8f90ad86 draft

Uploaded
author davidvanzessen
date Fri, 27 Sep 2013 06:11:35 -0400
parents 7a1b8021a191
children 6828af00686c
files RScript.r r_wrapper.sh tool_dependencies.xml
diffstat 3 files changed, 49 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/RScript.r	Fri Sep 27 04:44:52 2013 -0400
+++ b/RScript.r	Fri Sep 27 06:11:35 2013 -0400
@@ -5,11 +5,11 @@
 inFile = args[1]
 outFile = args[2]
 
-#install.packages("gridExtra", repos="http://cran.xl-mirror.nl/") 
+install.packages("gridExtra", repos="http://cran.xl-mirror.nl/") 
 library (gridExtra)
-#install.packages("ggplot2", repos="http://cran.xl-mirror.nl/") 
+install.packages("ggplot2", repos="http://cran.xl-mirror.nl/") 
 require(ggplot2)
-#install.packages("plyr", repos="http://cran.xl-mirror.nl/") 		
+install.packages("plyr", repos="http://cran.xl-mirror.nl/") 		
 require(plyr)
 
 test = read.table(inFile, sep="\t", header=TRUE)
@@ -91,9 +91,7 @@
 
 
 png(outFile,width = 1920, height = 1200)
-plot(pV)
-plotall = grid.arrange(pV, arrangeGrob(pD, pJ, ncol=2), ncol=1, widths=c(1,1.2))
-print(plotall)
+print(plotall = grid.arrange(pV, arrangeGrob(pD, pJ, ncol=2), ncol=1, widths=c(1,1.2)))
 dev.off()
 
 
--- a/r_wrapper.sh	Fri Sep 27 04:44:52 2013 -0400
+++ b/r_wrapper.sh	Fri Sep 27 06:11:35 2013 -0400
@@ -1,4 +1,5 @@
 #!/bin/bash
 dir="$(cd "$(dirname "$0")" && pwd)"
-Rscript --verbose $dir/RScript.r $1 "$2.png" 2>&1
+Rscript --verbose $R_SCRIPT_PATH/RScript.r $1 "$2.png" 2>&1
 mv -f "$2.png" $2
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_dependencies.xml	Fri Sep 27 06:11:35 2013 -0400
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<tool_dependency>
+    <set_environment version="1.0">
+        <environment_variable name="R_SCRIPT_PATH" action="set_to">$REPOSITORY_INSTALL_DIR</environment_variable>   
+    </set_environment>
+    <package name="R" version="2.15.1">
+        <install version="1.0">
+            <actions>
+                <action type="download_by_url">http://CRAN.R-project.org/src/base/R-2/R-2.15.1.tar.gz</action>
+                <action type="shell_command">./configure --prefix=$INSTALL_DIR</action>
+                <action type="shell_command">make</action>
+                
+                <action type="download_file">http://cran.r-project.org/src/contrib/gridExtra_0.9.1.tar.gz</action>
+                <action type=move_file">
+					<source>gridExtra_0.9.1.tar.gz</source>
+					<destination>$INSTALL_DIR</destination>
+                </action>
+                <action type="shell_command">$INSTALL_DIR/bin/R CMD INSTALL $INSTALL_DIR/gridExtra_0.9.1.tar.gz</action>
+                
+                <action type="download_file">http://cran.r-project.org/src/contrib/ggplot2_0.9.3.1.tar.gz</action>
+				<action type=move_file">
+					<source>ggplot2_0.9.3.1.tar.gz</source>
+					<destination>$INSTALL_DIR</destination>
+                </action>
+                <action type="shell_command">$INSTALL_DIR/bin/R CMD INSTALL $INSTALL_DIR/ggplot2_0.9.3.1.tar.gz</action>
+                
+                <action type="download_file">http://cran.r-project.org/src/contrib/plyr_1.8.tar.gz</action>
+                <action type=move_file">
+					<source>plyr_1.8.tar.gz</source>
+					<destination>$INSTALL_DIR</destination>
+                </action>
+                <action type="shell_command">$INSTALL_DIR/bin/R CMD INSTALL $INSTALL_DIR/plyr_1.8.tar.gz</action>
+                
+                
+                <action type="set_environment">
+                    <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/bin</environment_variable>
+                </action>
+                
+            </actions>
+        </install>
+        <readme>You need a FORTRAN compiler or perhaps f2c in addition to a C compiler to build R.</readme>
+    </package>
+</tool_dependency>