Repository 'mayatool_extract'
hg clone https://toolshed.g2.bx.psu.edu/repos/anmoljh/mayatool_extract

Changeset 0:e3086f60b0e4 (2018-06-01)
Next changeset 1:ae1ad90ca587 (2018-06-05)
Commit message:
planemo upload commit a1f4dd8eb560c649391ada1a6bb9505893a35272-dirty
added:
ExtractFromSDFiles.xml
tool_dependencies.xml
b
diff -r 000000000000 -r e3086f60b0e4 ExtractFromSDFiles.xml
--- /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>
b
diff -r 000000000000 -r e3086f60b0e4 tool_dependencies.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_dependencies.xml Fri Jun 01 04:57:02 2018 -0400
b
@@ -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>