changeset 0:8b939f621c64 draft default tip

Uploaded
author deepakjadmin
date Fri, 22 Jan 2016 14:13:39 -0500
parents
children
files csv2rdatatrain.R tool1reg.xml tool_dependencies.xml
diffstat 3 files changed, 74 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csv2rdatatrain.R	Fri Jan 22 14:13:39 2016 -0500
@@ -0,0 +1,25 @@
+args <- commandArgs(TRUE)
+####source("/home/galaxy/galaxy-dist/tools/mpdstools/tool1/csv2rdatatrain2.R")
+
+csv2rdatatrain <- function(arg1,arg2){ file <- read.csv(arg1,row.names =1, header=T)
+  col <- ncol(file)
+  stopifnot(is.null(file) | col > 2 )
+
+  #cat("the Outcome column is not a factor vector.\n",file=stderr())
+  stopifnot(is.numeric(file[,col]))
+
+ # if(is.numeric(file[,col])  {  
+    dataX <- file[,1:(col-1)]
+    dataY <- file[,col]
+    stopifnot(nrow(dataX) == length(dataY)) 
+    save(dataX,dataY,file=arg2)
+ # }else {     cat("the Outcome column has less number of entry than number of compounds.please check input file.\n",file=stderr())
+  #    } 
+ }
+
+csv2rdatatrain(args[1],args[2])
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool1reg.xml	Fri Jan 22 14:13:39 2016 -0500
@@ -0,0 +1,39 @@
+<tool id="AnderwjlV2" name="Prepare input file for regression analysis">
+<description>
+This Tool Converts Input csv File into RData Which Is Further Used for Model Building
+ </description>
+ 
+ <requirements>
+       <requirement type="set_environment">CARET_REG_TOOL1_PATH</requirement>
+     <requirement type="set_environment">R_ROOT_DIR</requirement>
+    <requirement type="package" version="3.2.0">R</requirement>
+    </requirements>
+ <command interpreter="Rscript">csv2rdatatrain.R $file1 $RData </command>
+ <inputs>
+ <param format="csv" name="file1" type="data" label="Select file containing training data" help="CSV format" />
+ </inputs>
+ <outputs>
+ <data type="data" name="RData" label="Input.RData" />
+ </outputs>
+<help>
+.. class:: infomark
+
+**Input "csv file" format must be as given below :**
+
+
+Name,feature1,feaure2,feature3,..,activity
+
+
+cpd1,623,0.4,3.4,..,Active
+                      
+cpd2,234,0.9,5.6,..,Inactive 
+
+cpd3,567,0.5,3.14,..,Active
+
+cpd4,231,0.1,1.2,..,Inactive 
+
+here "cpd" stands for name or id of a compound. It is rowname with no column header.     
+
+
+</help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_dependencies.xml	Fri Jan 22 14:13:39 2016 -0500
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<tool_dependency>
+
+<set_environment version="1.0">
+        <environment_variable name="CARET_REG_TOOL1_PATH" action="set_to">$REPOSITORY_INSTALL_DIR</environment_variable>   
+        </set_environment>
+    <package name="R" version="3.2.0">
+                        <repository changeset_revision="7833b0ebf8d6" name="package_r_3_2_0" owner="iuc" prior_installation_required="True" toolshed="https://testtoolshed.g2.bx.psu.edu" />
+                        </package>
+</tool_dependency>