changeset 0:e3086f60b0e4 draft

planemo upload commit a1f4dd8eb560c649391ada1a6bb9505893a35272-dirty
author anmoljh
date Fri, 01 Jun 2018 04:57:02 -0400
parents
children ae1ad90ca587
files ExtractFromSDFiles.xml tool_dependencies.xml
diffstat 2 files changed, 49 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ExtractFromSDFiles.xml	Fri Jun 01 04:57:02 2018 -0400
@@ -0,0 +1,43 @@
+<tool id="ExtractFromSDFiles" name="ExtractFromSDFiles" version="1.0">
+<description>extract data from file according to field name and Ids </description>
+<requirements>
+     <requirement type="package" version="9.0">mayachemtools</requirement>
+</requirements>
+<stdio>
+     <exit_code range="1:" />
+</stdio>
+
+<command> <![CDATA[ 
+
+#if '.sdf' in $inputsdf.name
+
+/bin/mkdir -p $inputsdf.extra_files_path;
+ln -sf $inputsdf $inputsdf.extra_files_path/molecules.sdf;
+
+ExtractFromSDFiles.pl -o -m datafieldbylist -d  $Identifier,`cat ${indexnumbers}`  -r $outputsdf.name $inputsdf.extra_files_path/molecules.sdf > $logs;
+
+/bin/rm -rf $inputsdf.extra_files_path;
+cp $outputsdf.name $outputsdf;
+
+#end if
+
+]]> </command>
+    <inputs>
+        <param name="inputsdf" type="data" format="sdf" label="Original SDF File " help="sdf file from which selected ids of molecules  need to be extracted." />
+        <param name="Identifier" type="text" label="Field name" help="Give field name of molecules on which compound need to be extracted Ex. MolID,PUBCHEM_COMPOUND_ID,CID etc." />
+        <param name="indexnumbers" type="data" format="txt" label="Id file which need to be extracted from dataset" help="select file of ids ie. result file obtained from the tool 'Extract IDs From Prediction Result'" />
+    </inputs>
+    <outputs>
+        <data name="outputsdf" format="sdf" label="extracted_cpds_from_${inputsdf.name}" />
+        <data name="logs" format="txt" label="logfile" />
+    </outputs>
+    <tests>
+        <test>
+              <param name="inputsdf" value="Pred_set.sdf"  />
+	      <param name="Identifier" value="MOLECULE_NAME" />
+	      <param name="indexnumbers" value="extracted_ids.txt"  />
+	      <output name="outputsdf" file="extracted_cpds.sdf" compare="sim_size" delta="8000000" />
+	      <output name="logs" file="ext_log.txt" compare="sim_size" delta="800000" />
+        </test>
+    </tests>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_dependencies.xml	Fri Jun 01 04:57:02 2018 -0400
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<tool_dependency>
+    <package name="mayachemtools" version="9.0">
+	    <repository changeset_revision="621b85a1b927" name="package_mayachemtools_9_0" owner="anmoljh" prior_installation_required="True" toolshed="https://toolshed.g2.bx.psu.edu/" />
+    </package>    
+</tool_dependency>