# HG changeset patch # User anmoljh # Date 1527781201 14400 # Node ID 49d7eb9e109270622cca0f280c8ca4023773cb83 planemo upload commit a1f4dd8eb560c649391ada1a6bb9505893a35272 diff -r 000000000000 -r 49d7eb9e1092 csv2rdata.R --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/csv2rdata.R Thu May 31 11:40:01 2018 -0400 @@ -0,0 +1,28 @@ +args <- commandArgs(TRUE) + +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.factor(file[,col])) + + if(levels(file[,col])[1] != ""){ + 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]) + + + + + diff -r 000000000000 -r 49d7eb9e1092 csv2rdata.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/csv2rdata.xml Thu May 31 11:40:01 2018 -0400 @@ -0,0 +1,51 @@ + + + Converts input csv file into RData format + + + + R + + + + + + + csv2rdata.R $file1 $RData + + + + + + + + + + + + + + + + + +.. class:: infomark + +**Input "csv file" format must be as given below :** + + +"",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. + + + diff -r 000000000000 -r 49d7eb9e1092 tool_dependencies.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_dependencies.xml Thu May 31 11:40:01 2018 -0400 @@ -0,0 +1,6 @@ + + + + + +