Mercurial > repos > bgruening > chemfp
comparison simsearch.xml @ 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 |
comparison
equal
deleted
inserted
replaced
3:892811a1f12c | 4:685a138131f0 |
---|---|
1 <tool id="ctb_simsearch" name="Similarity Search" version="0.1.1"> | 1 <tool id="ctb_simsearch" name="Similarity Search" version="0.2"> |
2 <description>of fingerprint data sets</description> | 2 <description>of fingerprint data sets</description> |
3 <requirements> | 3 <requirements> |
4 <requirement type="package" version="1.1p1">chemfp</requirement> | 4 <requirement type="package" version="1.1p1">chemfp</requirement> |
5 </requirements> | 5 </requirements> |
6 <command> | 6 <command> |
7 <![CDATA[ | 7 <![CDATA[ |
8 #if $method_opts.method_opts_selector == "chemfp": | 8 #if $method_opts.method_opts_selector == "chemfp": |
9 ln -s "${method_opts.query_opts.targets}" ./targets.fps && | 9 ln -s '${method_opts.query_opts.targets}' ./targets.fps && |
10 | |
10 #if $method_opts.query_opts.query_opts_selector == "normal": | 11 #if $method_opts.query_opts.query_opts_selector == "normal": |
11 ln -s "${method_opts.query_opts.query}" ./query.fps && | 12 ln -s '${method_opts.query_opts.query}' ./query.fps && |
12 #end if | 13 #end if |
13 | 14 |
14 simsearch | 15 simsearch |
15 #if int($method_opts.knn) == 0: | 16 #if int($method_opts.knn) == 0: |
16 #set $k = 'all' | 17 #set $k = 'all' |
33 --NxN | 34 --NxN |
34 #end if | 35 #end if |
35 | 36 |
36 ./targets.fps | 37 ./targets.fps |
37 && | 38 && |
38 mv ./output.fps "${outfile}" | 39 mv ./output.fps '${outfile}' |
39 #else: | 40 #else: |
40 ## OpenBabel needs the original molecule file (molecule.'fileformat') next to the fastsearch index (molecule.fs). We use a composite datatype to accomplish that. | 41 ## OpenBabel needs the original molecule file (molecule.'fileformat') next to the fastsearch index (molecule.fs). We use a composite datatype to accomplish that. |
41 ## 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. | 42 ## 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. |
42 ## A workaround is to create a symlink with a proper file-extension. | 43 ## A workaround is to create a symlink with a proper file-extension. |
43 #import tempfile | 44 ln -s '$method_opts.query' ./temp_query.$method_opts.query.ext |
44 #set $temp_file = tempfile.NamedTemporaryFile() | 45 obabel |
45 #set $temp_link = "%s.%s" % ($temp_file.name, $method_opts.query.ext) | 46 -i fs '$method_opts.fastsearch.files_path/molecule.fs' |
46 $temp_file.close() | 47 -S ./temp_query.$method_opts.query.ext |
47 ln -s $method_opts.query $temp_link; | 48 -at${method_opts.threshold} |
48 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; | 49 -O '${outfile}' |
49 rm $temp_link | 50 -osmi |
51 -aa | |
50 #end if | 52 #end if |
51 ]]> | 53 ]]> |
52 </command> | 54 </command> |
53 <inputs> | 55 <inputs> |
54 | |
55 <conditional name="method_opts"> | 56 <conditional name="method_opts"> |
56 <param name="method_opts_selector" type="select" label="Subject database/sequences"> | 57 <param name="method_opts_selector" type="select" label="Subject database/sequences"> |
57 <option value="chemfp">Chemfp fingerprint file</option> | 58 <option value="chemfp">Chemfp fingerprint file</option> |
58 <option value="obabel">OpenBabel Fastsearch Index</option> | 59 <option value="obabel">OpenBabel Fastsearch Index</option> |
59 </param> | 60 </param> |
108 Similarity searches using a variety of different fingerprints using either the chemfp_ FPS type or the Open Babel FastSearch_ index. | 109 Similarity searches using a variety of different fingerprints using either the chemfp_ FPS type or the Open Babel FastSearch_ index. |
109 | 110 |
110 .. _chemfp: http://chemfp.com/ | 111 .. _chemfp: http://chemfp.com/ |
111 .. _FastSearch: http://openbabel.org/wiki/FastSearch | 112 .. _FastSearch: http://openbabel.org/wiki/FastSearch |
112 | 113 |
113 ----- | |
114 | |
115 .. class:: infomark | |
116 | |
117 **Cite** | |
118 | |
119 | The chemfp_ project | |
120 | | |
121 | N M O'Boyle, M Banck, C A James, C Morley, T Vandermeersch and G R Hutchison - `Open Babel: An open chemical toolbox`_ | |
122 | |
123 .. _`Open Babel: An open chemical toolbox`: http://www.jcheminf.com/content/3/1/33 | |
124 | |
125 | 114 |
126 ]]> | 115 ]]> |
127 </help> | 116 </help> |
128 <citations> | 117 <citations> |
129 <citation type="doi">10.1186/1758-2946-3-33</citation> | 118 <citation type="doi">10.1186/1758-2946-3-33</citation> |
119 <citation type="doi">10.1186/1758-2946-5-S1-P36</citation> | |
130 </citations> | 120 </citations> |
131 </tool> | 121 </tool> |