changeset 0:af08995fd952 draft

Uploaded
author deepakjadmin
date Wed, 20 Jan 2016 05:17:11 -0500
parents
children b27fcd214692
files condition.R select_mol.xml tool_dependencies.xml
diffstat 3 files changed, 54 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/condition.R	Wed Jan 20 05:17:11 2016 -0500
@@ -0,0 +1,19 @@
+args <- commandArgs(T)
+arg1 <- args[1] ## Reae Input prediction file
+arg2 <- args[2] ## Less Than  
+arg3 <- args[3] ## Greater Than or equal too
+arg4 <- args[4] ## Active / Inactive
+arg5 <- args[5] ## define output file name
+asd <- read.table(arg1,row.names=1,header=T)
+if (arg4 == "Active") {
+refined <- asd[asd[,1] >= as.numeric(arg3) & asd[,1] <= as.numeric(arg2),] 
+compound  <- rownames(refined)
+refined <- cbind(compound,refined)
+} else if((arg4 == "Inactive") ){
+#refined <- asd[asd[,1] <= as.numeric(arg2),] 
+refined <- asd[asd[,2] >= as.numeric(arg3) & asd[,2] <= as.numeric(arg2),]
+compound  <- rownames(refined)
+refined <- cbind(compound,refined)}
+###write.table(dw,file=args3,row.names=FALSE,sep="\t")
+write.table(refined,file=arg5,row.names=FALSE,sep="\t")
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/select_mol.xml	Wed Jan 20 05:17:11 2016 -0500
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<tool id="aaacaret003" name="Extract Compound IDs From Prediction Result based on scores " version="1.0.1">
+<description>This tool extracts compounds from prediction result based on given score</description>
+<requirements>
+       <requirement type="set_environment">MAYA_TOOL1_PATH</requirement>
+    
+   
+</requirements>
+
+
+<command interpreter="Rscript">condition.R $predictionfile $LT $GT $type $SelectedCompound </command>
+
+<inputs>
+<param name="predictionfile" type="data" format="txt,tabular,csv" label="Predition Result File" help ="upload gcac prediction result file " /> 
+<param name="type" type="select" label="Active/Positive or Inactive/Negative" help ="select type of molecule">
+	<option value="Active" selected="True">Active/Positive</option> 
+	<option value="Inactive">Inactive/Negative</option>
+</param> 
+<param name="GT" type="float" value="0.5" label="Score greater than and equal to" help ="define value above which compound selected default is 0.5" /> 
+<param name="LT" type="float" value="1.0" label="Score less than and equal to" help ="define value below which compound selected default is 1" /> 
+</inputs>
+<outputs>
+<data name="SelectedCompound" type="data" format="txt" label="Refind-${predictionfile.name}" />
+</outputs>
+<help>
+</help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_dependencies.xml	Wed Jan 20 05:17:11 2016 -0500
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<tool_dependency>
+
+<set_environment version="1.0">
+        <environment_variable name="MAYA_TOOL1_PATH" action="set_to">$REPOSITORY_INSTALL_DIR</environment_variable>   
+        </set_environment>
+   
+</tool_dependency>