Mercurial > repos > bgruening > simsearch
annotate simsearch.xml @ 1:0892f7ced10c draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
author | bgruening |
---|---|
date | Sat, 20 May 2017 13:06:07 -0400 |
parents | 52e5c0f2907f |
children | 497254c6c09e |
rev | line source |
---|---|
1
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
1 <tool id="ctb_simsearch" name="Similarity Search" version="0.2"> |
0 | 2 <description>of fingerprint data sets</description> |
3 <requirements> | |
4 <requirement type="package" version="1.1p1">chemfp</requirement> | |
5 </requirements> | |
6 <command> | |
1
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
7 <![CDATA[ |
0 | 8 #if $method_opts.method_opts_selector == "chemfp": |
1
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
9 ln -s '${method_opts.query_opts.targets}' ./targets.fps && |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
10 |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
11 #if $method_opts.query_opts.query_opts_selector == "normal": |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
12 ln -s '${method_opts.query_opts.query}' ./query.fps && |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
13 #end if |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
14 |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
15 simsearch |
0 | 16 #if int($method_opts.knn) == 0: |
17 #set $k = 'all' | |
18 ## count is only available if k nearest neighbor search is disabled | |
19 $method_opts.counts | |
20 #else: | |
21 #set $k = int($method_opts.knn) | |
22 #end if | |
23 | |
1
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
24 -k $k |
0 | 25 --threshold $method_opts.threshold |
1
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
26 -o ./output.fps |
0 | 27 |
28 ## build and search an in-memory data structure (faster for multiple queries) | |
29 --memory | |
30 | |
31 #if $method_opts.query_opts.query_opts_selector == "normal": | |
1
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
32 -q ./query.fps |
0 | 33 #else: |
34 --NxN | |
35 #end if | |
36 | |
1
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
37 ./targets.fps |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
38 && |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
39 mv ./output.fps '${outfile}' |
0 | 40 #else: |
41 ## OpenBabel needs the original molecule file (molecule.'fileformat') next to the fastsearch index (molecule.fs). We use a composite datatype to accomplish that. | |
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. | |
43 ## A workaround is to create a symlink with a proper file-extension. | |
1
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
44 ln -s '$method_opts.query' ./temp_query.$method_opts.query.ext |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
45 obabel |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
46 -i fs '$method_opts.fastsearch.files_path/molecule.fs' |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
47 -S ./temp_query.$method_opts.query.ext |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
48 -at${method_opts.threshold} |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
49 -O '${outfile}' |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
50 -osmi |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
51 -aa |
0 | 52 #end if |
1
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
53 ]]> |
0 | 54 </command> |
55 <inputs> | |
56 <conditional name="method_opts"> | |
57 <param name="method_opts_selector" type="select" label="Subject database/sequences"> | |
58 <option value="chemfp">Chemfp fingerprint file</option> | |
59 <option value="obabel">OpenBabel Fastsearch Index</option> | |
60 </param> | |
61 <when value="chemfp"> | |
62 <conditional name="query_opts"> | |
63 <param name="query_opts_selector" type="select" label="Query Mode"> | |
64 <option value="normal">Query molecules are stores in a separate file</option> | |
65 <option value="nxn">Target molecules are also queries (NxN)</option> | |
66 </param> | |
67 <when value="normal"> | |
68 <param name='query' type='data' format="fps" label='Query molecules'/> | |
69 <param name='targets' type='data' format="fps" label='Target molecules'/> | |
70 </when> | |
71 <when value="nxn"> | |
72 <param name='targets' type='data' format="fps" label='Target moleculs'/> | |
73 </when> | |
74 </conditional> | |
75 <param name='knn' type='integer' value='0' label='select the k nearest neighbors' help='0 means all neighbors'> | |
76 <validator type="in_range" min="0" /> | |
77 </param> | |
78 <param name='threshold' type='float' value='0.7' label='threshold' /> | |
79 <param name="counts" type="boolean" truevalue="-c" falsevalue="" checked="false" label="report counts (-c)" help="Is ignored if k nearest neighbor search is enabled" /> | |
80 </when> | |
81 <when value="obabel"> | |
82 <param name="query" type='data' format="smi,mol,sdf,inchi" label="query"/> | |
83 <param name="fastsearch" type='data' format="obfs" label="OpenBabel Fastsearch Index"/> | |
84 <param name="threshold" type='float' label="threshold" value='0.7'/> | |
85 </when> | |
86 </conditional> | |
87 | |
88 </inputs> | |
89 <outputs> | |
90 <data name="outfile" format="tabular" /> | |
91 </outputs> | |
92 <tests> | |
93 <test> | |
94 <param name="targets" ftype="fps" value="targets.fps"/> | |
95 <param name="query" ftype="fps" value="q.fps"/> | |
96 <param name="k" value='4'/> | |
97 <param name="th" value='0.7'/> | |
98 <output name="outfile" ftype="tabular" file="simsearch_on_tragets_and_q.tabular"/> | |
99 </test> | |
100 </tests> | |
101 <help> | |
1
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
102 <![CDATA[ |
0 | 103 |
104 | |
105 .. class:: infomark | |
106 | |
107 **What this tool does** | |
108 | |
109 Similarity searches using a variety of different fingerprints using either the chemfp_ FPS type or the Open Babel FastSearch_ index. | |
110 | |
111 .. _chemfp: http://chemfp.com/ | |
112 .. _FastSearch: http://openbabel.org/wiki/FastSearch | |
113 | |
114 | |
1
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
115 ]]> |
0 | 116 </help> |
1
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
117 <citations> |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
118 <citation type="doi">10.1186/1758-2946-3-33</citation> |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
119 <citation type="doi">10.1186/1758-2946-5-S1-P36</citation> |
0892f7ced10c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/simsearch commit d786052cd04f8b25eb4aff80b1b9724f62031b61
bgruening
parents:
0
diff
changeset
|
120 </citations> |
0 | 121 </tool> |