changeset 0:3d2ac3dceb8f draft

Uploaded
author deepakjadmin
date Thu, 14 Jan 2016 07:02:12 -0500
parents
children 7571402e5768
files addact.pl addact.xml tool_dependencies.xml
diffstat 3 files changed, 69 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/addact.pl	Thu Jan 14 07:02:12 2016 -0500
@@ -0,0 +1,25 @@
+#!/usr/bin/perl 
+use warnings;
+use strict;
+open(FH,$ARGV[0])  or die "Couldn't open file, $!";
+open(DH,">$ARGV[4]") or die "Couldn't open file, $!";
+my $first_line = scalar <FH>;
+chomp($first_line);
+$first_line = join(",",$first_line,"outcome\n");
+print DH $first_line;
+while(<FH>){chomp($_);
+my $line= join(",",$_,"$ARGV[1]\n");
+print DH $line;
+}
+close FH;
+open(SH,$ARGV[2]) or die "Coudn't open file,$!";
+scalar <SH>;
+while(<SH>){ 
+if($ARGV[1] ne $ARGV[3]){chomp($_);
+my $line1= join(",",$_,"$ARGV[3]\n");
+print DH $line1;
+}
+else{ print ("There is error to assign activity\n");exit;}
+}
+close SH;
+close DH;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/addact.xml	Thu Jan 14 07:02:12 2016 -0500
@@ -0,0 +1,36 @@
+<tool id="aaapadel002" name="Merge files">
+<description>"Merge data files of Active and Inactive compounds "</description>
+<requirements>
+       <requirement type="set_environment">PADEL_TOOL2_PATH</requirement>
+    
+   
+</requirements>
+
+
+<command interpreter="perl">\$PADEL_TOOL2_PATH/addact.pl $Input1 $Activity1 $Input2 $Activity2 $Merged_file</command>
+<inputs>
+<param format="csv" name="Input1" type="data" label="Descriptor File 1" help="Upload Active/Inactive descriptor file in csv format"/>
+  <!--param name="Activity1" type="select"  label="Choose Appropriate Lable">
+	<option value = "Active" selected="TRUE">Active</option>
+	<option value = "Inactive" >Inactive</option>
+  </param-->
+ <param name="Activity1" type="text" value="Active" label="Select type of molecules" help="write something which defines data eg active,positive,inactive,negative,etc." >
+   <validator type="empty_field" message="This field can't be left blank"/>
+        </param>
+
+ <param format="txt" name="Input2" type="data" label="Descriptor File 2" help="Upload Active/Inactive descriptor file in csv format"/>
+ <param name="Activity2" type="text" value="Inactive" label="Select type of molecules" help="write something which defines data eg active,positive,inactive,negative,etc.">
+   <validator type="empty_field" message="This field can't be left blank"/>
+        </param>
+ <!--param name="Activity2" type="select"  label="Choose appropriate Label">
+        <option value = "Inactive" selected= "TRUE">Inactive</option>
+        <option value = "Active" >Active</option>
+ </param-->
+</inputs>
+<outputs>
+<data format="csv" name="Merged_file" label="Merged Mega Descriptor File "/> 
+</outputs>
+<help>
+Provide descriptor files of active/positive and inactive/negative molecules and assign them properly. 
+</help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_dependencies.xml	Thu Jan 14 07:02:12 2016 -0500
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<tool_dependency>
+
+<set_environment version="1.0">
+        <environment_variable name="PADELTOOL2_PATH" action="set_to">$REPOSITORY_INSTALL_DIR</environment_variable>   
+        </set_environment>
+   
+</tool_dependency>