changeset 4:685a138131f0 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit a44364ca5bccd47f9f331143e1abb286096e8807
author bgruening
date Sat, 20 May 2017 12:45:01 -0400
parents 892811a1f12c
children 57a1a58056a6
files simsearch.xml
diffstat 1 files changed, 14 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/simsearch.xml	Sat May 20 08:41:21 2017 -0400
+++ b/simsearch.xml	Sat May 20 12:45:01 2017 -0400
@@ -1,4 +1,4 @@
-<tool id="ctb_simsearch" name="Similarity Search" version="0.1.1">
+<tool id="ctb_simsearch" name="Similarity Search" version="0.2">
     <description>of fingerprint data sets</description>
     <requirements>
         <requirement type="package" version="1.1p1">chemfp</requirement>
@@ -6,9 +6,10 @@
     <command>
 <![CDATA[
         #if $method_opts.method_opts_selector == "chemfp":
-            ln -s "${method_opts.query_opts.targets}" ./targets.fps &&
+            ln -s '${method_opts.query_opts.targets}' ./targets.fps &&
+
             #if $method_opts.query_opts.query_opts_selector == "normal":
-                ln -s "${method_opts.query_opts.query}" ./query.fps &&
+                ln -s '${method_opts.query_opts.query}' ./query.fps &&
             #end if
 
             simsearch
@@ -35,23 +36,23 @@
 
                 ./targets.fps
                 &&
-                mv ./output.fps "${outfile}"
+                mv ./output.fps '${outfile}'
         #else:
             ## OpenBabel needs the original molecule file (molecule.'fileformat') next to the fastsearch index (molecule.fs). We use a composite datatype to accomplish that.
             ## Furthermore OpenBabel is really picky with file extensions. We need to specify every datatype. I did not find a solution to specify the query-filetype.
             ## A workaround is to create a symlink with a proper file-extension.
-            #import tempfile
-            #set $temp_file = tempfile.NamedTemporaryFile()
-            #set $temp_link = "%s.%s" % ($temp_file.name, $method_opts.query.ext)
-            $temp_file.close()
-            ln -s $method_opts.query $temp_link;
-            obabel -i fs "${os.path.join($method_opts.fastsearch.files_path,'molecule.fs')}" -S "${temp_link}" -at${method_opts.threshold} -O "${outfile}" -osmi -aa 2>&1;
-            rm $temp_link
+            ln -s '$method_opts.query' ./temp_query.$method_opts.query.ext
+            obabel 
+                -i fs '$method_opts.fastsearch.files_path/molecule.fs'
+                -S ./temp_query.$method_opts.query.ext
+                -at${method_opts.threshold}
+                -O '${outfile}'
+                -osmi
+                -aa
         #end if
 ]]>
     </command>
     <inputs>
-
         <conditional name="method_opts">
             <param name="method_opts_selector" type="select" label="Subject database/sequences">
               <option value="chemfp">Chemfp fingerprint file</option>
@@ -110,22 +111,11 @@
 .. _chemfp: http://chemfp.com/
 .. _FastSearch: http://openbabel.org/wiki/FastSearch
 
------
-
-.. class:: infomark
-
-**Cite**
-
-| The chemfp_ project
-|
-| N M O'Boyle, M Banck, C A James, C Morley, T Vandermeersch and G R Hutchison - `Open Babel: An open chemical toolbox`_
-
-.. _`Open Babel: An open chemical toolbox`: http://www.jcheminf.com/content/3/1/33
-
 
 ]]>
     </help>
     <citations>
         <citation type="doi">10.1186/1758-2946-3-33</citation>
+        <citation type="doi">10.1186/1758-2946-5-S1-P36</citation>
     </citations>
 </tool>